home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / tcsh6072.zip / tcsh6072 / tcshmans.txt < prev    next >
Text File  |  1997-06-06  |  200KB  |  5,479 lines

  1.  
  2.  
  3.  
  4. TCSH(1)                           TCSH(1)
  5.  
  6.  
  7. NAME
  8.        tcsh  - C shell with file name completion and command line
  9.        editing
  10.  
  11. SYNOPSIS
  12.        tcsh [-bcdefFimnqstvVxX] [-Dname[=value]] [arg ...]
  13.        tcsh -l
  14.  
  15. DESCRIPTION
  16.        tcsh is an enhanced but completely compatible  version  of
  17.        the  Berkeley  UNIX C shell, csh(1).  It is a command lan-
  18.        guage interpreter usable  both  as  an  interactive  login
  19.        shell and a shell script command processor.  It includes a
  20.        command-line editor (see The  command-line  editor),  pro-
  21.        grammable  word    completion  (see Completion and listing),
  22.        spelling correction (see Spelling correction),  a  history
  23.        mechanism  (see    History  substitution),  job control (see
  24.        Jobs) and a  C-like  syntax.   The  NEW    FEATURES  section
  25.        describes   major   enhancements   of  tcsh  over  csh(1).
  26.        Throughout this manual, features of tcsh not found in most
  27.        csh(1)  implementations (specifically, the 4.4BSD csh) are
  28.        labeled with `(+)', and    features  which  are  present  in
  29.        csh(1)  but not usually documented are labeled with `(u)'.
  30.  
  31.    Argument list processing
  32.        If the first argument (argument 0) to  the  shell  is  `-'
  33.        then it is a login shell.  A login shell can be also spec-
  34.        ified by invoking the shell with the -l flag as    the  only
  35.        argument.
  36.  
  37.        The rest of the flag arguments are interpreted as follows:
  38.  
  39.        -b  Forces a ``break'' from option processing, causing any
  40.        further  shell  arguments  to be treated as non-option
  41.        arguments.  The remaining arguments will not be inter-
  42.        preted  as  shell  options.     This may be used to pass
  43.        options to a shell script without confusion or  possi-
  44.        ble    subterfuge.  The shell will not run a set-user ID
  45.        script without this option.
  46.  
  47.        -c  Commands are read from the following  argument  (which
  48.        must  be  present,  and  must  be  a single argument),
  49.        stored in the command shell    variable  for  reference,
  50.        and    executed.   Any remaining arguments are placed in
  51.        the argv shell variable.
  52.  
  53.        -d  The shell loads the directory stack from ~/.cshdirs as
  54.        described  under  Startup and shutdown, whether or not
  55.        it is a login shell. (+)
  56.  
  57.        -Dname[=value]
  58.        Sets  the  environment   variable   name   to   value.
  59.        (Domain/OS only) (+)
  60.  
  61.  
  62.  
  63.  
  64. Astron 6.07.02         27 October 1996            1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TCSH(1)                           TCSH(1)
  71.  
  72.  
  73.        -e  The    shell  exits  if  any  invoked command terminates
  74.        abnormally or yields a non-zero exit status.
  75.  
  76.        -f  The shell ignores ~/.tcshrc, and thus starts faster.
  77.  
  78.        -F  The shell uses fork(2) instead of  vfork(2)    to  spawn
  79.        processes. (Convex/OS only) (+)
  80.  
  81.        -i  The shell is interactive and prompts for its top-level
  82.        input, even if  it  appears    to  not  be  a    terminal.
  83.        Shells  are    interactive  without this option if their
  84.        inputs and outputs are terminals.
  85.  
  86.        -l  The shell is a login shell. Only applicable if  -l  is
  87.        the only flag specified.
  88.  
  89.        -m  The    shell  loads ~/.tcshrc even if it does not belong
  90.        to the effective user. Newer  versions  of  su(1)  can
  91.        pass -m to the shell. (+)
  92.  
  93.        -n  The    shell  parses commands but does not execute them.
  94.        This aids in debugging shell scripts.
  95.  
  96.        -q  The shell accepts SIGQUIT (see  Signal  handling)  and
  97.        behaves  when it is used under a debugger. Job control
  98.        is disabled. (u)
  99.  
  100.        -s  Command input is taken from the standard input.
  101.  
  102.        -t  The shell reads and executes a single line  of  input.
  103.        A  `\' may be used to escape the newline at the end of
  104.        this line and continue onto another line.
  105.  
  106.        -v  Sets the verbose shell variable, so that command input
  107.        is echoed after history substitution.
  108.  
  109.        -x  Sets  the  echo  shell  variable, so that commands are
  110.        echoed immediately before execution.
  111.  
  112.        -V  Sets the verbose shell variable even before    executing
  113.        ~/.tcshrc.
  114.  
  115.        -X  Is to -x as -V is to -v.
  116.  
  117.        After  processing  of  flag arguments, if arguments remain
  118.        but none of the -c, -i, -s, or -t options were given,  the
  119.        first argument is taken as the name of a file of commands,
  120.        or ``script'', to be executed.  The shell opens this  file
  121.        and  saves  its    name for possible resubstitution by `$0'.
  122.        Since many systems use either the standard  version  6  or
  123.        version    7  shells  whose shell scripts are not compatible
  124.        with this shell, the shell uses such a `standard' shell to
  125.        execute    a script whose first character is not a `#', i.e.
  126.        which does not start with a comment.
  127.  
  128.  
  129.  
  130. Astron 6.07.02         27 October 1996            2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. TCSH(1)                           TCSH(1)
  137.  
  138.  
  139.        Remaining arguments are placed in the argv shell variable.
  140.  
  141.    Startup and shutdown
  142.        A login shell begins by executing commands from the system
  143.        files /etc/csh.cshrc and /etc/csh.login.  It then executes
  144.        commands  from  files  in the user's home directory: first
  145.        ~/.tcshrc (+) or, if ~/.tcshrc  is  not    found,    ~/.cshrc,
  146.        then  ~/.history (or the value of the histfile shell vari-
  147.        able), then ~/.login, and finally ~/.cshdirs (or the value
  148.        of  the    dirsfile shell variable) (+).  The shell may read
  149.        /etc/csh.login before instead of after /etc/csh.cshrc, and
  150.        ~/.login before instead of after ~/.tcshrc or ~/.cshrc and
  151.        ~/.history, if so compiled; see the  version  shell  vari-
  152.        able. (+)
  153.  
  154.        Non-login shells read only /etc/csh.cshrc and ~/.tcshrc or
  155.        ~/.cshrc on startup.
  156.  
  157.        Commands like stty(1) and tset(1), which need be run  only
  158.        once  per login, usually go in one's ~/.login file.  Users
  159.        who need to use the same set of files with both csh(1) and
  160.        tcsh  can  have only a ~/.cshrc which checks for the exis-
  161.        tence of the tcsh shell variable (q.v.) before using tcsh-
  162.        specific  commands,  or    can  have  both  a ~/.cshrc and a
  163.        ~/.tcshrc  which  sources  (see     the   builtin     command)
  164.        ~/.cshrc.   The    rest  of  this manual uses `~/.tcshrc' to
  165.        mean `~/.tcshrc or, if ~/.tcshrc is not found,  ~/.cshrc'.
  166.  
  167.        In the normal case, the shell begins reading commands from
  168.        the terminal, prompting with `> '.  (Processing    of  argu-
  169.        ments and the use of the shell to process files containing
  170.        command scripts are described later.)  The  shell  repeat-
  171.        edly  reads a line of command input, breaks it into words,
  172.        places it on the command history list, parses it and  exe-
  173.        cutes each command in the line.
  174.  
  175.        One  can log out by typing `^D' on an empty line, `logout'
  176.        or `login' or via the shell's  autologout  mechanism  (see
  177.        the autologout shell variable).    When a login shell termi-
  178.        nates it sets the logout shell  variable  to  `normal'  or
  179.        `automatic'  as    appropriate,  then executes commands from
  180.        the files /etc/csh.logout and  ~/.logout.  The  shell  may
  181.        drop  DTR  on logout if so compiled; see the version shell
  182.        variable.
  183.  
  184.        The names of the system login and logout files  vary  from
  185.        system  to  system for compatibility with different csh(1)
  186.        variants; see FILES.
  187.  
  188.    Editing
  189.        We first describe The command-line editor.  The Completion
  190.        and  listing and Spelling correction sections describe two
  191.        sets of functionality which are implemented as editor com-
  192.        mands  but  which  deserve  their own treatment.  Finally,
  193.  
  194.  
  195.  
  196. Astron 6.07.02         27 October 1996            3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. TCSH(1)                           TCSH(1)
  203.  
  204.  
  205.        Editor commands lists and describes  the  editor  commands
  206.        specific to the shell and their default bindings.
  207.  
  208.    The command-line editor (+)
  209.        Command-line  input can be edited using key sequences much
  210.        like those used in GNU Emacs  or  vi(1).   The  editor  is
  211.        active  only when the edit shell variable is set, which it
  212.        is by default in interactive shells.  The bindkey  builtin
  213.        can  display  and  change  key  bindings.  Emacs-style key
  214.        bindings are used by default (unless the  shell    was  com-
  215.        piled  otherwise;  see  the  version  shell variable), but
  216.        bindkey can change the key bindings to  vi-style  bindings
  217.        en masse.
  218.  
  219.        The  shell  always binds the arrow keys (as defined in the
  220.        TERMCAP environment variable) to
  221.  
  222.        down    down-history
  223.        up       up-history
  224.        left    backward-char
  225.        right   forward-char
  226.  
  227.        unless doing so would alter another single-character bind-
  228.        ing.   One  can    set the arrow key escape sequences to the
  229.        empty string with settc to prevent  these  bindings.   The
  230.        ANSI/VT100 sequences for arrow keys are always bound.
  231.  
  232.        Other  key bindings are, for the most part, what Emacs and
  233.        vi(1) users would expect and can easily    be  displayed  by
  234.        bindkey,  so there is no need to list them here. Likewise,
  235.        bindkey can list the editor commands with a short descrip-
  236.        tion of each.
  237.  
  238.        Note that editor commands do not have the same notion of a
  239.        ``word'' as does the shell. The editor delimits words with
  240.        any  non-alphanumeric characters not in the shell variable
  241.        wordchars, while the shell recognizes only whitespace  and
  242.        some of the characters with special meanings to it, listed
  243.        under Lexical structure.
  244.  
  245.    Completion and listing (+)
  246.        The shell is often able to complete  words  when  given    a
  247.        unique abbreviation.  Type part of a word (for example `ls
  248.        /usr/lost') and hit the tab key to run  the  complete-word
  249.        editor    command.    The   shell  completes  the  filename
  250.        `/usr/lost' to `/usr/lost+found/',  replacing  the  incom-
  251.        plete  word  with  the  complete word in the input buffer.
  252.        (Note the terminal `/'; completion adds a `/' to  the  end
  253.        of  completed  directories and a space to the end of other
  254.        completed words, to speed  typing  and  provide    a  visual
  255.        indicator  of  successful completion.  The addsuffix shell
  256.        variable can be unset to prevent this.)    If  no    match  is
  257.        found  (perhaps `/usr/lost+found' doesn't exist), the ter-
  258.        minal  bell  rings.   If  the  word  is    already  complete
  259.  
  260.  
  261.  
  262. Astron 6.07.02         27 October 1996            4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. TCSH(1)                           TCSH(1)
  269.  
  270.  
  271.        (perhaps there is a `/usr/lost' on your system, or perhaps
  272.        you were thinking too far ahead and typed the whole thing)
  273.        a  `/'  or  space  is added to the end if it isn't already
  274.        there.
  275.  
  276.        Completion works anywhere in the line,  not  just  at  the
  277.        end;  completed    text  pushes  the rest of the line to the
  278.        right. Completion in the middle of a word often results in
  279.        leftover  characters to the right of the cursor which need
  280.        to be deleted.
  281.  
  282.        Commands and variables can be completed in much    the  same
  283.        way.  For example, typing `em[tab]' would complete `em' to
  284.        `emacs' if emacs were the  only    command  on  your  system
  285.        beginning with `em'.  Completion can find a command in any
  286.        directory in path or if given  a  full  pathname.   Typing
  287.        `echo  $ar[tab]'  would    complete  `$ar'  to `$argv' if no
  288.        other variable began with `ar'.
  289.  
  290.        The shell parses the input buffer to determine whether the
  291.        word  you  want to complete should be completed as a file-
  292.        name, command or variable.  The first word in  the  buffer
  293.        and  the first word following `;', `|', `|&', `&&' or `||'
  294.        is considered to be a command.  A word beginning with  `$'
  295.        is  considered to be a variable.  Anything else is a file-
  296.        name. An empty line is `completed' as a filename.
  297.  
  298.        You can list the possible completions of  a  word  at  any
  299.        time  by typing `^D' to run the delete-char-or-list-or-eof
  300.        editor command.    The shell lists the possible  completions
  301.        using the ls-F builtin (q.v.)  and reprints the prompt and
  302.        unfinished command line, for example:
  303.  
  304.        > ls /usr/l[^D]
  305.        lbin/       lib/       local/      lost+found/
  306.        > ls /usr/l
  307.  
  308.        If the autolist shell variable is set, the shell lists the
  309.        remaining choices (if any) whenever completion fails:
  310.  
  311.        > set autolist
  312.        > nm /usr/lib/libt[tab]
  313.        libtermcap.a@ libtermlib.a@
  314.        > nm /usr/lib/libterm
  315.  
  316.        If autolist is set to `ambiguous', choices are listed only
  317.        when completion fails and adds no new  characters  to  the
  318.        word being completed.
  319.  
  320.        A filename to be completed can contain variables, your own
  321.        or others' home    directories  abbreviated  with    `~'  (see
  322.        Filename  substitution) and directory stack entries abbre-
  323.        viated with `=' (see Directory  stack  substitution).  For
  324.        example,
  325.  
  326.  
  327.  
  328. Astron 6.07.02         27 October 1996            5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. TCSH(1)                           TCSH(1)
  335.  
  336.  
  337.        > ls ~k[^D]
  338.        kahn    kas       kellogg
  339.        > ls ~ke[tab]
  340.        > ls ~kellogg/
  341.  
  342.        or
  343.  
  344.        > set local = /usr/local
  345.        > ls $lo[tab]
  346.        > ls $local/[^D]
  347.        bin/ etc/ lib/ man/ src/
  348.        > ls $local/
  349.  
  350.        Note  that  variables can also be expanded explicitly with
  351.        the expand-variables editor command.
  352.  
  353.        delete-char-or-list-or-eof only lists at the  end  of  the
  354.        line;  in  the  middle  of a line it deletes the character
  355.        under the cursor and on an empty line it logs one out  or,
  356.        if  ignoreeof  is set, does nothing.  `M-^D', bound to the
  357.        editor command list-choices, lists  completion  possibili-
  358.        ties  anywhere  on a line, and list-choices (or any one of
  359.        the related editor commands which do or don't delete, list
  360.        and/or  log  out, listed under delete-char-or-list-or-eof)
  361.        can be bound to `^D' with the bindkey builtin  command  if
  362.        so desired.
  363.  
  364.        The  complete-word-fwd  and complete-word-back editor com-
  365.        mands (not bound to any keys by default) can  be  used  to
  366.        cycle  up  and  down  through the list of possible comple-
  367.        tions, replacing the current word with the next or  previ-
  368.        ous word in the list.
  369.  
  370.        The  shell  variable  fignore can be set to a list of suf-
  371.        fixes to be ignored by completion. Consider the following:
  372.  
  373.        > ls
  374.        Makefile       condiments.h~   main.o       side.c
  375.        README       main.c       meal        side.o
  376.        condiments.h    main.c~
  377.        > set fignore = (.o \~)
  378.        > emacs ma[^D]
  379.        main.c   main.c~  main.o
  380.        > emacs ma[tab]
  381.        > emacs main.c
  382.  
  383.        `main.c~'  and `main.o' are ignored by completion (but not
  384.        listing), because they end in suffixes in  fignore.   Note
  385.        that  a    `\' was needed in front of `~' to prevent it from
  386.        being expanded to home as described under Filename substi-
  387.        tution.    fignore is ignored if only one completion is pos-
  388.        sible.
  389.  
  390.        If the  complete  shell    variable  is  set  to  `enhance',
  391.  
  392.  
  393.  
  394. Astron 6.07.02         27 October 1996            6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. TCSH(1)                           TCSH(1)
  401.  
  402.  
  403.        completion  1)  ignores    case  and  2)  considers periods,
  404.        hyphens and underscores (`.', `-' and `_') to be word sep-
  405.        arators    and  hyphens and underscores to be equivalent. If
  406.        you had the following files
  407.  
  408.        comp.lang.c        comp.lang.perl   comp.std.c++
  409.        comp.lang.c++    comp.std.c
  410.  
  411.        and typed `mail -f c.l.c[tab]', it would be  completed  to
  412.        `mail -f comp.lang.c', and ^D would list `comp.lang.c' and
  413.        `comp.lang.c++'.   `mail   -f   c..c++[^D]'   would   list
  414.        `comp.lang.c++'      and     `comp.std.c++'.    Typing    `rm
  415.        a--file[^D]' in the following directory
  416.  
  417.        A_silly_file             a-hyphenated-file
  418.        another_silly_file
  419.  
  420.        would  list  all  three files, because case is ignored and
  421.        hyphens and underscores are equivalent. Periods,  however,
  422.        are not equivalent to hyphens or underscores.
  423.  
  424.        Completion and listing are affected by several other shell
  425.        variables: recexact can be set to complete on the shortest
  426.        possible unique match, even if more typing might result in
  427.        a longer match:
  428.  
  429.        > ls
  430.        fodder   foo      food     foonly
  431.        > set recexact
  432.        > rm fo[tab]
  433.  
  434.        just beeps, because `fo' could expand to `fod'  or  `foo',
  435.        but if we type another `o',
  436.  
  437.        > rm foo[tab]
  438.        > rm foo
  439.  
  440.        the  completion completes on `foo', even though `food' and
  441.        `foonly' also match.  autoexpand can be    set  to  run  the
  442.        expand-history    editor    command  before  each  completion
  443.        attempt, autocorrect can be set    to  spelling-correct  the
  444.        word to be completed (see Spelling correction) before each
  445.        completion attempt and correct can be set to complete com-
  446.        mands  automatically  after  one hits `return'.    matchbeep
  447.        can be set to make completion beep or not beep in a  vari-
  448.        ety  of situations, and nobeep can be set to never beep at
  449.        all.  nostat can be set to a list  of  directories  and/or
  450.        patterns which match directories to prevent the completion
  451.        mechanism from stat(2)ing those directories.  listmax  and
  452.        listmaxrows  can  be  set to limit the number of items and
  453.        rows (respectively) that are listed without asking  first.
  454.        recognize_only_executables  can    be  set to make the shell
  455.        list only executables when listing  commands,  but  it  is
  456.        quite slow.
  457.  
  458.  
  459.  
  460. Astron 6.07.02         27 October 1996            7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. TCSH(1)                           TCSH(1)
  467.  
  468.  
  469.        Finally,  the complete builtin command can be used to tell
  470.        the shell how to complete words other than filenames, com-
  471.        mands  and  variables.  Completion and listing do not work
  472.        on glob-patterns  (see  Filename  substitution),  but  the
  473.        list-glob  and expand-glob editor commands perform equiva-
  474.        lent functions for glob-patterns.
  475.  
  476.    Spelling correction (+)
  477.        The shell can sometimes correct the spelling of filenames,
  478.        commands  and  variable    names  as  well as completing and
  479.        listing them.
  480.  
  481.        Individual words can be spelling-corrected with the spell-
  482.        word editor command (usually bound to M-s and M-S) and the
  483.        entire input buffer  with  spell-line  (usually    bound  to
  484.        M-$).   The  correct shell variable can be set to `cmd' to
  485.        correct the command name or `all' to  correct  the  entire
  486.        line each time return is typed, and autocorrect can be set
  487.        to correct the word to be completed before each completion
  488.        attempt.
  489.  
  490.        When  spelling  correction is invoked in any of these ways
  491.        and the shell thinks that any part of the command line  is
  492.        misspelled, it prompts with the corrected line:
  493.  
  494.        > set correct = cmd
  495.        > lz /usr/bin
  496.        CORRECT>ls /usr/bin (y|n|e|a)?
  497.  
  498.        One can answer `y' or space to execute the corrected line,
  499.        `e' to leave the uncorrected command in the input  buffer,
  500.        `a' to abort the command as if `^C' had been hit, and any-
  501.        thing else to execute the original line unchanged.
  502.  
  503.        Spelling correction  recognizes    user-defined  completions
  504.        (see  the complete builtin command). If an input word in a
  505.        position for which a completion    is  defined  resembles    a
  506.        word in the completion list, spelling correction registers
  507.        a misspelling and suggests the latter word  as  a  correc-
  508.        tion. However, if the input word does not match any of the
  509.        possible completions for that position,    spelling  correc-
  510.        tion does not register a misspelling.
  511.  
  512.        Like completion, spelling correction works anywhere in the
  513.        line, pushing the rest of the line to the right and possi-
  514.        bly leaving extra characters to the right of the cursor.
  515.  
  516.        Beware:    spelling correction is not guaranteed to work the
  517.        way one intends, and is provided mostly as an experimental
  518.        feature.  Suggestions and improvements are welcome.
  519.  
  520.    Editor commands (+)
  521.        `bindkey'  lists  key  bindings and `bindkey -l' lists and
  522.        briefly describes editor commands.  Only new or especially
  523.  
  524.  
  525.  
  526. Astron 6.07.02         27 October 1996            8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. TCSH(1)                           TCSH(1)
  533.  
  534.  
  535.        interesting  editor  commands  are  described  here.   See
  536.        emacs(1) and vi(1) for descriptions of each  editor's  key
  537.        bindings.
  538.  
  539.        The character or characters to which each command is bound
  540.        by default is given in parentheses. `^character'  means    a
  541.        control    character  and    `M-character'  a  meta character,
  542.        typed as escape-character on terminals without a meta key.
  543.        Case  counts,  but  commands which are bound to letters by
  544.        default are bound to both lower- and uppercase letters for
  545.        convenience.
  546.  
  547.        complete-word (tab)
  548.            Completes a word as described under Completion and
  549.            listing.
  550.  
  551.        complete-word-back (not bound)
  552.            Like complete-word-fwd, but steps up from the  end
  553.            of the list.
  554.  
  555.        complete-word-fwd (not bound)
  556.            Replaces  the  current word with the first word in
  557.            the list of possible completions. May be  repeated
  558.            to  step down through the list.    At the end of the
  559.            list, beeps and reverts to the incomplete word.
  560.  
  561.        complete-word-raw (^X-tab)
  562.            Like complete-word, but ignores user-defined  com-
  563.            pletions.
  564.  
  565.        copy-prev-word (M-^_)
  566.            Copies  the previous word in the current line into
  567.            the input buffer.  See also insert-last-word.
  568.  
  569.        dabbrev-expand (M-/)
  570.            Expands the current word to the most  recent  pre-
  571.            ceding one for which the current is a leading sub-
  572.            string, wrapping around the history list (once) if
  573.            necessary.   Repeating  dabbrev-expand without any
  574.            intervening typing changes to  the  next  previous
  575.            word  etc.,  skipping  identical matches much like
  576.            history-search-backward does.
  577.  
  578.        delete-char (not bound)
  579.            Deletes the character under the cursor.    See  also
  580.            delete-char-or-list-or-eof.
  581.  
  582.        delete-char-or-eof (not bound)
  583.            Does delete-char if there is a character under the
  584.            cursor or end-of-file on an empty line.    See  also
  585.            delete-char-or-list-or-eof.
  586.  
  587.        delete-char-or-list (not bound)
  588.            Does delete-char if there is a character under the
  589.  
  590.  
  591.  
  592. Astron 6.07.02         27 October 1996            9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. TCSH(1)                           TCSH(1)
  599.  
  600.  
  601.            cursor or list-choices at the  end  of  the  line.
  602.            See also delete-char-or-list-or-eof.
  603.  
  604.        delete-char-or-list-or-eof (^D)
  605.            Does delete-char if there is a character under the
  606.            cursor, list-choices at the end    of  the  line  or
  607.            end-of-file  on    an  empty  line.   See also those
  608.            three commands, each of which only does    a  single
  609.            action,    and  delete-char-or-eof,  delete-char-or-
  610.            list and list-or-eof, each of which does a differ-
  611.            ent two out of the three.
  612.  
  613.        down-history (down-arrow, ^N)
  614.            Like  up-history,  but steps down, stopping at the
  615.            original input line.
  616.  
  617.        end-of-file (not bound)
  618.            Signals an end of file, causing the shell to  exit
  619.            unless  the ignoreeof shell variable (q.v.) is set
  620.            to prevent this.  See also delete-char-or-list-or-
  621.            eof.
  622.  
  623.        expand-history (M-space)
  624.            Expands history substitutions in the current word.
  625.            See History substitution.  See  also  magic-space,
  626.            toggle-literal-history  and  the  autoexpand shell
  627.            variable.
  628.  
  629.        expand-glob (^X-*)
  630.            Expands the glob-pattern to the left of    the  cur-
  631.            sor.  See Filename substitution.
  632.  
  633.        expand-line (not bound)
  634.            Like expand-history, but expands history substitu-
  635.            tions in each word in the input buffer,
  636.  
  637.        expand-variables (^X-$)
  638.            Expands the variable to the left  of  the  cursor.
  639.            See Variable substitution.
  640.  
  641.        history-search-backward (M-p, M-P)
  642.            Searches  backwards through the history list for a
  643.            command beginning with the current contents of the
  644.            input  buffer  up to the cursor and copies it into
  645.            the input buffer.  The  search  string  may  be    a
  646.            glob-pattern  (see Filename substitution) contain-
  647.            ing `*', `?', `[]' or `{}'.  up-history and  down-
  648.            history will proceed from the appropriate point in
  649.            the history list.  Emacs mode only.  See also his-
  650.            tory-search-forward and i-search-back.
  651.  
  652.        history-search-forward (M-n, M-N)
  653.            Like  history-search-backward,  but  searches for-
  654.            ward.
  655.  
  656.  
  657.  
  658. Astron 6.07.02         27 October 1996               10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. TCSH(1)                           TCSH(1)
  665.  
  666.  
  667.        i-search-back (not bound)
  668.            Searches  backward  like  history-search-backward,
  669.            copies  the first match into the input buffer with
  670.            the cursor positioned at the end of  the  pattern,
  671.            and  prompts  with  `bck:  '  and the first match.
  672.            Additional characters may be typed to  extend  the
  673.            search,    i-search-back  may  be    typed to continue
  674.            searching with the same pattern,  wrapping  around
  675.            the history list if necessary, (i-search-back must
  676.            be bound to a single character for this    to  work)
  677.            or  one of the following special characters may be
  678.            typed:
  679.  
  680.            ^W       Appends the rest of the word under the
  681.                cursor to the search pattern.
  682.            delete (or any character bound to backward-
  683.                delete-char)
  684.                Undoes the effect of the last  charac-
  685.                ter typed and deletes a character from
  686.                the search pattern if appropriate.
  687.            ^G       If the previous search was successful,
  688.                aborts  the    entire    search.   If not,
  689.                goes  back  to  the    last   successful
  690.                search.
  691.            escape  Ends  the  search, leaving the current
  692.                line in the input buffer.
  693.  
  694.            Any other  character  not  bound  to  self-insert-
  695.            command terminates the search, leaving the current
  696.            line in the input buffer, and is then  interpreted
  697.            as  normal input. In particular, a carriage return
  698.            causes the current line    to  be    executed.   Emacs
  699.            mode  only.   See  also    i-search-fwd and history-
  700.            search-backward.
  701.  
  702.        i-search-fwd (not bound)
  703.            Like i-search-back, but searches forward.
  704.  
  705.        insert-last-word (M-_)
  706.            Inserts the last word of the previous  input  line
  707.            (`!$') into the input buffer.  See also copy-prev-
  708.            word.
  709.  
  710.        list-choices (M-^D)
  711.            Lists completion possibilities as described  under
  712.            Completion  and listing.  See also delete-char-or-
  713.            list-or-eof and list-choices-raw.
  714.  
  715.        list-choices-raw (^X-^D)
  716.            Like list-choices, but ignores  user-defined  com-
  717.            pletions.
  718.  
  719.        list-glob (^X-g, ^X-G)
  720.            Lists  (via the ls-F builtin) matches to the glob-
  721.  
  722.  
  723.  
  724. Astron 6.07.02         27 October 1996               11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. TCSH(1)                           TCSH(1)
  731.  
  732.  
  733.            pattern (see Filename substitution) to the left of
  734.            the cursor.
  735.  
  736.        list-or-eof (not bound)
  737.            Does list-choices or end-of-file on an empty line.
  738.            See also delete-char-or-list-or-eof.
  739.  
  740.        magic-space (not bound)
  741.            Expands history substitutions in the current line,
  742.            like  expand-history, and appends a space.  magic-
  743.            space is designed to be bound to the spacebar, but
  744.            is not bound by default.
  745.  
  746.        normalize-command (^X-?)
  747.            Searches  for  the current word in PATH and, if it
  748.            is found, replaces it with the full  path  to  the
  749.            executable. Special characters are quoted. Aliases
  750.            are  expanded  and  quoted  but    commands   within
  751.            aliases    are not. This command is useful with com-
  752.            mands which take commands as arguments, e.g. `dbx'
  753.            and `sh -x'.
  754.  
  755.        normalize-path (^X-n, ^X-N)
  756.            Expands    the  current  word as described under the
  757.            `expand' setting of the symlinks shell variable.
  758.  
  759.        overwrite-mode (unbound)
  760.            Toggles between input and overwrite modes.
  761.  
  762.        run-fg-editor (M-^Z)
  763.            Saves the current  input  line  and  looks  for    a
  764.            stopped    job  with a name equal to the last compo-
  765.            nent of the file name part of the EDITOR or VISUAL
  766.            environment variables, or, if neither is set, `ed'
  767.            or `vi'.  If such a job is found, it is    restarted
  768.            as  if  `fg %job' had been typed.  This is used to
  769.            toggle back and forth between an  editor  and  the
  770.            shell  easily.    Some  people bind this command to
  771.            `^Z' so they can do this even more easily.
  772.  
  773.        run-help (M-h, M-H)
  774.            Searches for documentation on the current command,
  775.            using  the same notion of `current command' as the
  776.            completion routines, and prints it.  There  is  no
  777.            way to use a pager; run-help is designed for short
  778.            help files.  Documentation should  be  in  a  file
  779.            named  command.help,  command.1,  command.6,  com-
  780.            mand.8 or command, which should be in one  of  the
  781.            directories  listed  in the HPATH enviroment vari-
  782.            able.  If there is more than one  help  file  only
  783.            the first is printed.
  784.  
  785.        self-insert-command (text characters)
  786.            In  insert  mode  (the default), inserts the typed
  787.  
  788.  
  789.  
  790. Astron 6.07.02         27 October 1996               12
  791.  
  792.  
  793.  
  794.  
  795.  
  796. TCSH(1)                           TCSH(1)
  797.  
  798.  
  799.            character into the input line after the    character
  800.            under the cursor.  In overwrite mode, replaces the
  801.            character under the cursor with the typed  charac-
  802.            ter.  The input mode is normally preserved between
  803.            lines, but the inputmode shell variable can be set
  804.            to  `insert'  or  `overwrite' to put the editor in
  805.            that mode at the beginning of each line.  See also
  806.            overwrite-mode.
  807.  
  808.        sequence-lead-in (arrow prefix, meta prefix, ^X)
  809.            Indicates  that    the following characters are part
  810.            of a multi-key sequence. Binding a  command  to    a
  811.            multi-key  sequence  really  creates two bindings:
  812.            the first character to  sequence-lead-in  and  the
  813.            whole  sequence    to  the  command.  All    sequences
  814.            beginning with a character bound to sequence-lead-
  815.            in  are    effectively bound to undefined-key unless
  816.            bound to another command.
  817.  
  818.        spell-line (M-$)
  819.            Attempts to correct the spelling of each  word  in
  820.            the  input  buffer,  like  spell-word, but ignores
  821.            words whose first character is one  of  `-',  `!',
  822.            `^'  or    `%', or which contain `\', `*' or `?', to
  823.            avoid problems with  switches,  substitutions  and
  824.            the like.  See Spelling correction.
  825.  
  826.        spell-word (M-s, M-S)
  827.            Attempts  to  correct  the spelling of the current
  828.            word  as  described  under  Spelling   correction.
  829.            Checks  each  component of a word which appears to
  830.            be a pathname.
  831.  
  832.        toggle-literal-history (M-r, M-R)
  833.            Expands or `unexpands'  history    substitutions  in
  834.            the input buffer.  See also expand-history and the
  835.            autoexpand shell variable.
  836.  
  837.        undefined-key (any unbound key)
  838.            Beeps.
  839.  
  840.        up-history (up-arrow, ^P)
  841.            Copies the previous entry in the history list into
  842.            the  input  buffer.   If  histlit is set, uses the
  843.            literal form of the entry.   May  be  repeated  to
  844.            step  up through the history list, stopping at the
  845.            top.
  846.  
  847.        vi-search-back (?)
  848.            Prompts with `?' for a search string (which may be
  849.            a  glob-pattern, as with history-search-backward),
  850.            searches for it    and  copies  it  into  the  input
  851.            buffer. The bell rings if no match is found.  Hit-
  852.            ting return ends the search and    leaves    the  last
  853.  
  854.  
  855.  
  856. Astron 6.07.02         27 October 1996               13
  857.  
  858.  
  859.  
  860.  
  861.  
  862. TCSH(1)                           TCSH(1)
  863.  
  864.  
  865.            match  in  the  input buffer.  Hitting escape ends
  866.            the search and executes the match.  vi mode  only.
  867.  
  868.        vi-search-fwd (/)
  869.            Like vi-search-back, but searches forward.
  870.  
  871.        which-command (M-?)
  872.            Does  a    which (see the description of the builtin
  873.            command) on the first word of the input buffer.
  874.  
  875.    Lexical structure
  876.        The shell splits input lines  into  words  at  blanks  and
  877.        tabs.   The  special  characters  `&', `|', `;', `<', `>',
  878.        `(', and `)' and the doubled characters `&&',  `||',  `<<'
  879.        and  `>>'  are  always separate words, whether or not they
  880.        are surrounded by whitespace.
  881.  
  882.        When the shell's input is not a    terminal,  the    character
  883.        `#'  is taken to begin a comment. Each `#' and the rest of
  884.        the input line on which it  appears  is    discarded  before
  885.        further parsing.
  886.  
  887.        A special character (including a blank or tab) may be pre-
  888.        vented from having its special meaning, and possibly  made
  889.        part  of  another  word,  by preceding it with a backslash
  890.        (`\') or enclosing it in single    (`''),    double    (`"')  or
  891.        backward (``') quotes. When not otherwise quoted a newline
  892.        preceded by a `\' is equivalent to  a  blank,  but  inside
  893.        quotes this sequence results in a newline.
  894.  
  895.        Furthermore,  all Substitutions (see below) except History
  896.        substitution can be prevented by enclosing the strings (or
  897.        parts  of strings) in which they appear with single quotes
  898.        or by quoting the crucial character(s) (e.g.  `$'  or  ``'
  899.        for  Variable substitution or Command substitution respec-
  900.        tively) with `\'. (Alias  substitution  is  no  exception:
  901.        quoting    in  any  way any character of a word for which an
  902.        alias has been defined prevents substitution of the alias.
  903.        The  usual way of quoting an alias is to precede it with a
  904.        backslash.) History substitution  is  prevented    by  back-
  905.        slashes    but  not  by  single quotes.  Strings quoted with
  906.        double or backward quotes  undergo  Variable  substitution
  907.        and Command substitution, but other substitutions are pre-
  908.        vented.
  909.  
  910.        Text inside single or double quotes becomes a single  word
  911.        (or  part  of  one).   Metacharacters  in  these  strings,
  912.        including blanks and tabs, do  not  form  separate  words.
  913.        Only  in one special case (see Command substitution below)
  914.        can a double-quoted string yield parts of  more    than  one
  915.        word;  single-quoted strings never do. Backward quotes are
  916.        special: they signal Command  substitution  (q.v.),  which
  917.        may result in more than one word.
  918.  
  919.  
  920.  
  921.  
  922. Astron 6.07.02         27 October 1996               14
  923.  
  924.  
  925.  
  926.  
  927.  
  928. TCSH(1)                           TCSH(1)
  929.  
  930.  
  931.        Quoting    complex strings, particularly strings which them-
  932.        selves  contain    quoting  characters,  can  be  confusing.
  933.        Remember that quotes need not be used as they are in human
  934.        writing! It may be easier to quote not an  entire  string,
  935.        but  only  those  parts    of the string which need quoting,
  936.        using different types of quoting to do so if  appropriate.
  937.  
  938.        The  backslash_quote  shell  variable (q.v.) can be set to
  939.        make backslashes always quote `\', `'', and `"'. (+)  This
  940.        may  make  complex  quoting tasks easier, but it can cause
  941.        syntax errors in csh(1) scripts.
  942.  
  943.    Substitutions
  944.        We now describe the various transformations the shell per-
  945.        forms  on  the  input in the order in which they occur. We
  946.        note in passing the data structures involved and the  com-
  947.        mands  and variables which affect them. Remember that sub-
  948.        stitutions can be prevented by quoting as described  under
  949.        Lexical structure.
  950.  
  951.    History substitution
  952.        Each  command,  or  ``event'',  input from the terminal is
  953.        saved in the history list.  The previous command is always
  954.        saved, and the history shell variable can be set to a num-
  955.        ber to save that many commands. The histdup shell variable
  956.        can  be    set  to  not save duplicate events or consecutive
  957.        duplicate events.
  958.  
  959.        Saved  commands    are  numbered  sequentially  from  1  and
  960.        stamped with the time.  It is not usually necessary to use
  961.        event numbers, but the current event number  can  be  made
  962.        part  of  the prompt by placing an `!' in the prompt shell
  963.        variable.
  964.  
  965.        The shell actually saves history in expanded  and  literal
  966.        (unexpanded) forms.  If the histlit shell variable is set,
  967.        commands that display and store history    use  the  literal
  968.        form.
  969.  
  970.        The  history  builtin  command can print, store in a file,
  971.        restore and clear the history list at any  time,  and  the
  972.        savehist and histfile shell variables can be can be set to
  973.        store the history list automatically on logout and restore
  974.        it on login.
  975.  
  976.        History    substitutions  introduce  words  from the history
  977.        list into the input stream, making it easy to repeat  com-
  978.        mands,  repeat arguments of a previous command in the cur-
  979.        rent command, or fix spelling  mistakes    in  the  previous
  980.        command    with  little  typing  and a high degree of confi-
  981.        dence.
  982.  
  983.        History substitutions begin with the character  `!'.  They
  984.        may  begin  anywhere  in the input stream, but they do not
  985.  
  986.  
  987.  
  988. Astron 6.07.02         27 October 1996               15
  989.  
  990.  
  991.  
  992.  
  993.  
  994. TCSH(1)                           TCSH(1)
  995.  
  996.  
  997.        nest.  The `!' may be preceded by a  `\'  to  prevent  its
  998.        special     meaning;   for  convenience,  a  `!'  is  passed
  999.        unchanged when it is followed by a  blank,  tab,  newline,
  1000.        `='  or    `('.   History    substitutions  also occur when an
  1001.        input line begins with  `^'.   This  special  abbreviation
  1002.        will  be  described  later.  The characters used to signal
  1003.        history substitution (`!' and `^') can be changed by  set-
  1004.        ting  the  histchars  shell variable. Any input line which
  1005.        contains a history substitution is printed  before  it  is
  1006.        executed.
  1007.  
  1008.        A  history  substitution  may  have  an ``event specifica-
  1009.        tion'', which indicates the event from which words are  to
  1010.        be  taken, a ``word designator'', which selects particular
  1011.        words from the chosen event, and/or a ``modifier'',  which
  1012.        manipulates the selected words.
  1013.  
  1014.        An event specification can be
  1015.  
  1016.        n       A number, referring to a particular event
  1017.        -n       An offset, referring to the event n before the
  1018.            current event
  1019.        #       The current event.  This should be used  care-
  1020.            fully  in  csh(1), where there is no check for
  1021.            recursion. tcsh allows 10 levels of recursion.
  1022.            (+)
  1023.        !       The previous event (equivalent to `-1')
  1024.        s       The    most recent event whose first word begins
  1025.            with the string s
  1026.        ?s?       The    most  recent  event  which  contains  the
  1027.            string s.  The second `?' can be omitted if it
  1028.            is immediately followed by a newline.
  1029.  
  1030.        For example, consider this bit of someone's history list:
  1031.  
  1032.         9  8:30    nroff -man wumpus.man
  1033.        10  8:31    cp wumpus.man wumpus.man.old
  1034.        11  8:36    vi wumpus.man
  1035.        12  8:37    diff wumpus.man.old wumpus.man
  1036.  
  1037.        The commands are shown with their event numbers    and  time
  1038.        stamps.    The current event, which we haven't typed in yet,
  1039.        is event 13.  `!11' and `!-2' refer  to    event  11.   `!!'
  1040.        refers  to the previous event, 12. `!!' can be abbreviated
  1041.        `!' if it is followed by `:'  (`:'  is  described  below).
  1042.        `!n'  refers  to event 9, which begins with `n'.  `!?old?'
  1043.        also refers to event 12, which  contains  `old'.   Without
  1044.        word  designators  or  modifiers history references simply
  1045.        expand to the entire event, so we might type `!cp' to redo
  1046.        the  copy  command  or  `!!|more'  if  the  `diff'  output
  1047.        scrolled off the top of the screen.
  1048.  
  1049.        History references may be insulated from  the  surrounding
  1050.        text with braces if necessary.  For example, `!vdoc' would
  1051.  
  1052.  
  1053.  
  1054. Astron 6.07.02         27 October 1996               16
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. TCSH(1)                           TCSH(1)
  1061.  
  1062.  
  1063.        look for a command beginning with  `vdoc',  and,  in  this
  1064.        example,  not  find  one, but `!{v}doc' would expand unam-
  1065.        biguously to `vi wumpus.mandoc'.  Even in braces,  history
  1066.        substitutions do not nest.
  1067.  
  1068.        (+)  While  csh(1)  expands, for example, `!3d' to event 3
  1069.        with the letter `d' appended to it, tcsh expands it to the
  1070.        last  event  beginning  with `3d'; only completely numeric
  1071.        arguments are treated as event  numbers.   This    makes  it
  1072.        possible  to  recall  events  beginning    with numbers.  To
  1073.        expand `!3d' as in csh(1) say `!\3d'.
  1074.  
  1075.        To select words from an event  we  can  follow  the  event
  1076.        specification  by  a  `:' and a designator for the desired
  1077.        words.  The words of an input line are  numbered  from  0,
  1078.        the  first (usually command) word being 0, the second word
  1079.        (first argument) being 1, etc. The basic word  designators
  1080.        are:
  1081.  
  1082.        0       The first (command) word
  1083.        n       The nth argument
  1084.        ^       The first argument, equivalent to `1'
  1085.        $       The last argument
  1086.        %       The word matched by an ?s? search
  1087.        x-y       A range of words
  1088.        -y       Equivalent to `0-y'
  1089.        *       Equivalent  to  `^-$',  but returns nothing if
  1090.            the event contains only 1 word
  1091.        x*       Equivalent to `x-$'
  1092.        x-       Equivalent to `x*', but omitting the last word
  1093.            (`$')
  1094.  
  1095.        Selected  words    are  inserted into the command line sepa-
  1096.        rated by single blanks.    For example, the  `diff'  command
  1097.        in  the    previous  example  might have been typed as `diff
  1098.        !!:1.old !!:1' (using `:1' to select  the  first  argument
  1099.        from  the  previous event) or `diff !-2:2 !-2:1' to select
  1100.        and swap the arguments from the `cp' command. If we didn't
  1101.        care  about  the  order    of  the `diff' we might have said
  1102.        `diff !-2:1-2' or simply `diff !-2:*'.  The  `cp'  command
  1103.        might  have  been  written `cp wumpus.man !#:1.old', using
  1104.        `#' to refer to    the  current  event.   `!n:-  hurkle.man'
  1105.        would  reuse  the first two words from the `nroff' command
  1106.        to say `nroff -man hurkle.man'.
  1107.  
  1108.        The `:' separating the event specification from    the  word
  1109.        designator  can be omitted if the argument selector begins
  1110.        with a `^', `$', `*', `%' or `-'.  For example, our `diff'
  1111.        command    might  have  been  `diff !!^.old !!^' or, equiva-
  1112.        lently, `diff !!$.old !!$'. However, if `!!'  is  abbrevi-
  1113.        ated  `!', an argument selector beginning with `-' will be
  1114.        interpreted as an event specification.
  1115.  
  1116.        A history reference may have  a    word  designator  but  no
  1117.  
  1118.  
  1119.  
  1120. Astron 6.07.02         27 October 1996               17
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. TCSH(1)                           TCSH(1)
  1127.  
  1128.  
  1129.        event specification.  It then references the previous com-
  1130.        mand.  Continuing our `diff' example, we could  have  said
  1131.        simply  `diff  !^.old  !^' or, to get the arguments in the
  1132.        opposite order, just `diff !*'.
  1133.  
  1134.        The word or words in a history reference can be edited, or
  1135.        ``modified'',  by following it with one or more modifiers,
  1136.        each preceded by a `:':
  1137.  
  1138.        h       Remove a trailing pathname component,  leaving
  1139.            the head.
  1140.        t       Remove  all leading pathname components, leav-
  1141.            ing the tail.
  1142.        r       Remove a filename  extension  `.xxx',  leaving
  1143.            the root name.
  1144.        e       Remove all but the extension.
  1145.        u       Uppercase the first lowercase letter.
  1146.        l       Lowercase the first uppercase letter.
  1147.        s/l/r/  Substitute l for r.    l is simply a string like
  1148.            r, not a regular expression as in  the  epony-
  1149.            mous ed(1) command.    Any character may be used
  1150.            as the delimiter in place of `/'; a `\' can be
  1151.            used  to  quote  the delimiter inside l and r.
  1152.            The character `&' in the r is replaced  by  l;
  1153.            `\'    also  quotes  `&'.  If l is empty (``''),
  1154.            the l from a previous substitution  or  the    s
  1155.            from  a  previous `?s?' event specification is
  1156.            used.  The trailing delimiter may  be  omitted
  1157.            if it is immediately followed by a newline.
  1158.        &       Repeat the previous substitution.
  1159.        g       Apply  the  following  modifier  once  to each
  1160.            word.
  1161.        a (+)   Apply the following modifier as many times  as
  1162.            possible to a single word.  `a' and `g' can be
  1163.            used together to apply  a  modifier    globally.
  1164.            In  the  current implementation, using the `a'
  1165.            and `s' modifiers  together    can  lead  to  an
  1166.            infinite  loop.  For example, `:as/f/ff/' will
  1167.            never terminate.  This behavior  might  change
  1168.            in the future.
  1169.        p       Print  the new command line but do not execute
  1170.            it.
  1171.        q       Quote the substituted words,  preventing  fur-
  1172.            ther substitutions.
  1173.        x       Like  q,  but break into words at blanks, tabs
  1174.            and newlines.
  1175.  
  1176.        Modifiers are applied only to the  first  modifiable  word
  1177.        (unless    `g'  is  used).  It is an error for no word to be
  1178.        modifiable.
  1179.  
  1180.        For example, the `diff' command might have been written as
  1181.        `diff  wumpus.man.old  !#^:r', using `:r' to remove `.old'
  1182.        from the first argument on the same line (`!#^'). We could
  1183.  
  1184.  
  1185.  
  1186. Astron 6.07.02         27 October 1996               18
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. TCSH(1)                           TCSH(1)
  1193.  
  1194.  
  1195.        say `echo hello out there', then `echo !*:u' to capitalize
  1196.        `hello', `echo !*:au' to say it out loud, or `echo !*:agu'
  1197.        to  really  shout.   We might follow `mail -s "I forgot my
  1198.        password" rot' with `!:s/rot/root' to correct the spelling
  1199.        of  `root'  (but  see  Spelling correction for a different
  1200.        approach).
  1201.  
  1202.        There is a special abbreviation for  substitutions.   `^',
  1203.        when it is the first character on an input line, is equiv-
  1204.        alent to `!:s^'.  Thus we might have said  `^rot^root'  to
  1205.        make  the  spelling  correction    in  the previous example.
  1206.        This is the  only  history  substitution  which    does  not
  1207.        explicitly begin with `!'.
  1208.  
  1209.        (+)  In    csh  as such, only one modifier may be applied to
  1210.        each history or variable expansion. In tcsh, more than one
  1211.        may be used, for example
  1212.  
  1213.        % mv wumpus.man /usr/man/man1/wumpus.1
  1214.        % man !$:t:r
  1215.        man wumpus
  1216.  
  1217.        In  csh,  the result would be `wumpus.1:r'. A substitution
  1218.        followed by a colon may need to be insulated from it  with
  1219.        braces:
  1220.  
  1221.        > mv a.out /usr/games/wumpus
  1222.        > setenv PATH !$:h:$PATH
  1223.        Bad ! modifier: $.
  1224.        > setenv PATH !{-2$:h}:$PATH
  1225.        setenv PATH /usr/games:/bin:/usr/bin:.
  1226.  
  1227.        The  first attempt would succeed in csh but fails in tcsh,
  1228.        because tcsh expects another  modifier  after  the  second
  1229.        colon rather than `$'.
  1230.  
  1231.        Finally,  history  can  be  accessed through the editor as
  1232.        well as through the substitutions just described.  The up-
  1233.        and down-history, history-search-backward and -forward, i-
  1234.        search-back and -fwd, vi-search-back and -fwd,  copy-prev-
  1235.        word  and  insert-last-word  editor  commands  search  for
  1236.        events in the history list and copy them  into  the  input
  1237.        buffer.      The    toggle-literal-history     editor   command
  1238.        switches between the expanded and literal forms of history
  1239.        lines in the input buffer.  expand-history and expand-line
  1240.        expand history substitutions in the current  word  and  in
  1241.        the entire input buffer respectively.
  1242.  
  1243.    Alias substitution
  1244.        The  shell  maintains  a list of aliases which can be set,
  1245.        unset and printed  by  the  alias  and  unalias    commands.
  1246.        After  a  command line is parsed into simple commands (see
  1247.        Commands) the first word of each  command,  left-to-right,
  1248.        is  checked  to    see if it has an alias.  If so, the first
  1249.  
  1250.  
  1251.  
  1252. Astron 6.07.02         27 October 1996               19
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. TCSH(1)                           TCSH(1)
  1259.  
  1260.  
  1261.        word is replaced by the alias. If  the  alias  contains    a
  1262.        history     reference,  it  undergoes  History  substitution
  1263.        (q.v.) as though the original command  were  the  previous
  1264.        input line. If the alias does not contain a history refer-
  1265.        ence, the argument list is left untouched.
  1266.  
  1267.        Thus if the alias for `ls' were `ls -l'    the  command  `ls
  1268.        /usr'  would  become  `ls -l /usr', the argument list here
  1269.        being undisturbed.  If the alias for `lookup'  were  `grep
  1270.        !^ /etc/passwd' then `lookup bill' would become `grep bill
  1271.        /etc/passwd'.  Aliases can be  used  to    introduce  parser
  1272.        metasyntax.   For  example,  `alias  print 'pr \!* | lpr''
  1273.        defines a ``command'' (`print') which pr(1)s its arguments
  1274.        to the line printer.
  1275.  
  1276.        Alias substitution is repeated until the first word of the
  1277.        command has no alias. If an alias  substitution    does  not
  1278.        change  the  first word (as in the previous example) it is
  1279.        flagged to prevent a loop. Other loops  are  detected  and
  1280.        cause an error.
  1281.  
  1282.        Some  aliases  are  referred  to by the shell; see Special
  1283.        aliases.
  1284.  
  1285.    Variable substitution
  1286.        The shell maintains a list of variables, each of which has
  1287.        as  value  a  list  of  zero or more words.  The values of
  1288.        shell variables can be displayed and changed with the  set
  1289.        and  unset commands.  The system maintains its own list of
  1290.        ``environment'' variables.  These  can  be  displayed  and
  1291.        changed with printenv, setenv and unsetenv.
  1292.  
  1293.        (+)  Variables  may be made read-only with `set -r' (q.v.)
  1294.        Read-only variables may not be modified or unset; attempt-
  1295.        ing  to do so will cause an error.  Once made read-only, a
  1296.        variable cannot be made writable, so `set  -r'  should  be
  1297.        used  with  caution.  Environment variables cannot be made
  1298.        read-only.
  1299.  
  1300.        Some variables are set by the shell or referred to by  it.
  1301.        For instance, the argv variable is an image of the shell's
  1302.        argument list, and words  of  this  variable's  value  are
  1303.        referred  to  in  special  ways.   Some    of  the variables
  1304.        referred to by the shell are toggles; the shell    does  not
  1305.        care  what  their  value  is, only whether they are set or
  1306.        not.  For instance, the verbose variable is a toggle which
  1307.        causes  command    input  to be echoed.  The -v command line
  1308.        option sets this variable.  Special shell variables  lists
  1309.        all variables which are referred to by the shell.
  1310.  
  1311.        Other  operations  treat  variables  numerically.  The `@'
  1312.        command permits numeric calculations to be  performed  and
  1313.        the  result  assigned to a variable.  Variable values are,
  1314.        however, always represented as  (zero  or  more)  strings.
  1315.  
  1316.  
  1317.  
  1318. Astron 6.07.02         27 October 1996               20
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. TCSH(1)                           TCSH(1)
  1325.  
  1326.  
  1327.        For the purposes of numeric operations, the null string is
  1328.        considered to be zero, and the second and subsequent words
  1329.        of multiword values are ignored.
  1330.  
  1331.        After  the  input  line    is aliased and parsed, and before
  1332.        each command is executed, variable  substitution  is  per-
  1333.        formed  keyed  by  `$'  characters.  This expansion can be
  1334.        prevented by preceding the `$' with a  `\'  except  within
  1335.        `"'s  where  it    always    occurs,  and within `''s where it
  1336.        never occurs.  Strings quoted by ``' are interpreted later
  1337.        (see  Command substitution below) so `$' substitution does
  1338.        not occur there until later, if at all.    A `$'  is  passed
  1339.        unchanged if followed by a blank, tab, or end-of-line.
  1340.  
  1341.        Input/output  redirections  are recognized before variable
  1342.        expansion, and are variable expanded  separately.   Other-
  1343.        wise,  the  command  name  and  entire  argument  list are
  1344.        expanded together.  It is  thus    possible  for  the  first
  1345.        (command)  word    (to this point) to generate more than one
  1346.        word, the first of which becomes the command name, and the
  1347.        rest of which become arguments.
  1348.  
  1349.        Unless  enclosed  in  `"'  or  given the `:q' modifier the
  1350.        results of variable substitution may eventually be command
  1351.        and  filename  substituted.   Within `"', a variable whose
  1352.        value consists of multiple words expands to a (portion  of
  1353.        a)  single  word,  with    the words of the variable's value
  1354.        separated by blanks.  When the `:q' modifier is applied to
  1355.        a  substitution the variable will expand to multiple words
  1356.        with each word separated by a blank and quoted to  prevent
  1357.        later command or filename substitution.
  1358.  
  1359.        The  following  metasequences are provided for introducing
  1360.        variable values into the shell input.  Except as noted, it
  1361.        is an error to reference a variable which is not set.
  1362.  
  1363.        $name
  1364.        ${name} Substitutes  the  words    of  the value of variable
  1365.            name, each separated by a blank.  Braces  insulate
  1366.            name  from following characters which would other-
  1367.            wise be part of it.  Shell  variables  have  names
  1368.            consisting of up to 20 letters and digits starting
  1369.            with a letter.  The underscore character  is  con-
  1370.            sidered    a  letter.   If name is not a shell vari-
  1371.            able, but is set in  the  environment,  then  that
  1372.            value is returned (but `:' modifiers and the other
  1373.            forms given below are not available in this case).
  1374.        $name[selector]
  1375.        ${name[selector]}
  1376.            Substitutes only the selected words from the value
  1377.            of name.  The selector is subjected to `$' substi-
  1378.            tution  and  may consist of a single number or two
  1379.            numbers separated by a `-'.  The first word  of    a
  1380.            variable's  value  is  numbered `1'.  If the first
  1381.  
  1382.  
  1383.  
  1384. Astron 6.07.02         27 October 1996               21
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. TCSH(1)                           TCSH(1)
  1391.  
  1392.  
  1393.            number of a range is omitted it defaults  to  `1'.
  1394.            If  the    last  member  of  a  range  is omitted it
  1395.            defaults to `$#name'.  The  selector  `*'  selects
  1396.            all  words.   It is not an error for a range to be
  1397.            empty if the second  argument  is  omitted  or  in
  1398.            range.
  1399.        $0      Substitutes  the  name of the file from which com-
  1400.            mand input is being read.  An error occurs if  the
  1401.            name is not known.
  1402.        $number
  1403.        ${number}
  1404.            Equivalent to `$argv[number]'.
  1405.        $*      Equivalent  to  `$argv',  which    is  equivalent to
  1406.            `$argv[*]'.
  1407.  
  1408.        The `:' modifiers described  under  History  substitution,
  1409.        except  for  `:p',  can    be  applied  to the substitutions
  1410.        above. More than one may be used. (+) Braces may be needed
  1411.        to  insulate  a variable substitution from a literal colon
  1412.        just as with History substitution  (q.v.);  any    modifiers
  1413.        must appear within the braces.
  1414.  
  1415.        The  following  substitutions can not be modified with `:'
  1416.        modifiers.
  1417.  
  1418.        $?name
  1419.        ${?name}
  1420.            Substitutes the string `1' if name is set, `0'  if
  1421.            it is not.
  1422.        $?0     Substitutes  `1'  if the current input filename is
  1423.            known, `0' if it is not.  Always `0'  in  interac-
  1424.            tive shells.
  1425.        $#name
  1426.        ${#name}
  1427.            Substitutes the number of words in name.
  1428.        $#      Equivalent to `$#argv'. (+)
  1429.        $%name
  1430.        ${%name}
  1431.            Substitutes the number of characters in name. (+)
  1432.        $%number
  1433.        ${%number}
  1434.            Substitutes    the   number   of   characters   in
  1435.            $argv[number]. (+)
  1436.        $?      Equivalent to `$status'. (+)
  1437.        $$      Substitutes the (decimal) process  number  of  the
  1438.            (parent) shell.
  1439.        $!      Substitutes  the  (decimal)  process number of the
  1440.            last background process started by this shell.
  1441.        $<      Substitutes a line from the standard  input,  with
  1442.            no  further  interpretation thereafter.    It can be
  1443.            used to read from the keyboard in a shell  script.
  1444.            (+)  While  csh    always    quotes    $<, as if it were
  1445.            equivalent to `$<:q', tcsh does not.  Furthermore,
  1446.            when  tcsh  is  waiting for a line to be typed the
  1447.  
  1448.  
  1449.  
  1450. Astron 6.07.02         27 October 1996               22
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. TCSH(1)                           TCSH(1)
  1457.  
  1458.  
  1459.            user  may  type    an  interrupt  to  interrupt  the
  1460.            sequence into which the line is to be substituted,
  1461.            but csh does not allow this.
  1462.  
  1463.        The editor command  expand-variables,  normally    bound  to
  1464.        `^X-$',    can  be  used  to interactively expand individual
  1465.        variables.
  1466.  
  1467.    Command, filename and directory stack substitution
  1468.        The remaining substitutions are applied selectively to the
  1469.        arguments  of  builtin commands.  This means that portions
  1470.        of expressions which are not evaluated are  not    subjected
  1471.        to  these expansions.  For commands which are not internal
  1472.        to the shell, the command name is  substituted  separately
  1473.        from  the  argument  list.   This  occurs very late, after
  1474.        input-output redirection is performed, and in a    child  of
  1475.        the main shell.
  1476.  
  1477.    Command substitution
  1478.        Command substitution is indicated by a command enclosed in
  1479.        ``'.  The output from such a command is broken into  sepa-
  1480.        rate  words  at    blanks, tabs and newlines, and null words
  1481.        are discarded. The output is variable and command  substi-
  1482.        tuted and put in place of the original string.
  1483.  
  1484.        Command    substitutions  inside  double quotes (`"') retain
  1485.        blanks and tabs; only newlines force new words.    The  sin-
  1486.        gle  final  newline does not force a new word in any case.
  1487.        It is thus possible for a command  substitution    to  yield
  1488.        only  part  of  a word, even if the command outputs a com-
  1489.        plete line.
  1490.  
  1491.    Filename substitution
  1492.        If a word contains any of the characters `*', `?', `['  or
  1493.        `{' or begins with the character `~' it is a candidate for
  1494.        filename substitution, also known  as  ``globbing''.  This
  1495.        word is then regarded as a pattern (``glob-pattern''), and
  1496.        replaced with an alphabetically sorted list of file  names
  1497.        which match the pattern.
  1498.  
  1499.        In  matching filenames, the character `.' at the beginning
  1500.        of a filename or immediately following a `/', as  well  as
  1501.        the character `/' must be matched explicitly.  The charac-
  1502.        ter `*' matches any string of  characters,  including  the
  1503.        null string.  The character `?' matches any single charac-
  1504.        ter.  The sequence `[...]' matches any one of the  charac-
  1505.        ters enclosed.  Within `[...]', a pair of characters sepa-
  1506.        rated by `-' matches any character lexically  between  the
  1507.        two.
  1508.  
  1509.        (+)  Some  glob-patterns  can  be  negated:  The  sequence
  1510.        `[^...]' matches any single character not specified by the
  1511.        characters and/or ranges of characters in the braces.
  1512.  
  1513.  
  1514.  
  1515.  
  1516. Astron 6.07.02         27 October 1996               23
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. TCSH(1)                           TCSH(1)
  1523.  
  1524.  
  1525.        An entire glob-pattern can also be negated with `^':
  1526.  
  1527.        > echo *
  1528.        bang crash crunch ouch
  1529.        > echo ^cr*
  1530.        bang ouch
  1531.  
  1532.        Glob-patterns  which do not use `?', `*', or `[]' or which
  1533.        use `{}' or `~' (below) are not negated correctly.
  1534.  
  1535.        The metanotation `a{b,c,d}e' is a shorthand for    `abe  ace
  1536.        ade'.       Left-to-right      order    is     preserved:
  1537.        `/usr/source/s1/{oldls,ls}.c'          expands           to
  1538.        `/usr/source/s1/oldls.c    /usr/source/s1/ls.c'. The results
  1539.        of matches are sorted separately at a low  level  to  pre-
  1540.        serve   this   order:  `../{memo,*box}'    might  expand  to
  1541.        `../memo ../box    ../mbox'.   (Note  that  `memo'  was  not
  1542.        sorted with the results of matching `*box'.)  It is not an
  1543.        error when this construct expands to files  which  do  not
  1544.        exist,  but  it is possible to get an error from a command
  1545.        to which the expanded list is passed.  This construct  may
  1546.        be  nested.  As a special case the words `{', `}' and `{}'
  1547.        are passed undisturbed.
  1548.  
  1549.        The character `~' at the beginning of a filename refers to
  1550.        home directories.  Standing alone, i.e. `~', it expands to
  1551.        the invoker's home directory as reflected in the value  of
  1552.        the  home shell variable. When followed by a name consist-
  1553.        ing of  letters,  digits  and  `-'  characters  the  shell
  1554.        searches  for  a user with that name and substitutes their
  1555.        home directory; thus `~ken' might expand to `/usr/ken' and
  1556.        `~ken/chmach'  to `/usr/ken/chmach'.  If the character `~'
  1557.        is followed by a character other than a letter or  `/'  or
  1558.        appears    elsewhere  than at the beginning of a word, it is
  1559.        left  undisturbed.   A  command     like    `setenv   MANPATH
  1560.        /usr/man:/usr/local/man:~/lib/man' does not, therefore, do
  1561.        home directory substitution as one might hope.
  1562.  
  1563.        It is an error for a glob-pattern containing `*', `?', `['
  1564.        or  `~', with or without `^', not to match any files. How-
  1565.        ever, only one pattern in a  list  of  glob-patterns  must
  1566.        match  a  file (so that, e.g., `rm *.a *.c *.o' would fail
  1567.        only if there were no files in the current directory  end-
  1568.        ing  in    `.a',  `.c', or `.o'), and if the nonomatch shell
  1569.        variable is set a pattern  (or  list  of  patterns)  which
  1570.        matches    nothing  is left unchanged rather than causing an
  1571.        error.
  1572.  
  1573.        The noglob shell variable can be set to    prevent  filename
  1574.        substitution, and the expand-glob editor command, normally
  1575.        bound to `^X-*', can be used to interactively expand indi-
  1576.        vidual filename substitutions.
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582. Astron 6.07.02         27 October 1996               24
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. TCSH(1)                           TCSH(1)
  1589.  
  1590.  
  1591.    Directory stack substitution (+)
  1592.        The  directory  stack  is  a list of directories, numbered
  1593.        from zero, used by the pushd, popd and dirs  builtin  com-
  1594.        mands  (q.v.).    dirs  can print, store in a file, restore
  1595.        and clear  the  directory  stack  at  any  time,  and  the
  1596.        savedirs  and dirsfile shell variables can be set to store
  1597.        the directory stack automatically on logout and restore it
  1598.        on  login.  The dirstack shell variable can be examined to
  1599.        see the directory stack and set to put arbitrary  directo-
  1600.        ries into the directory stack.
  1601.  
  1602.        The  character  `=' followed by one or more digits expands
  1603.        to an entry in the directory stack. The special case  `=-'
  1604.        expands to the last directory in the stack. For example,
  1605.  
  1606.        > dirs -v
  1607.        0       /usr/bin
  1608.        1       /usr/spool/uucp
  1609.        2       /usr/accts/sys
  1610.        > echo =1
  1611.        /usr/spool/uucp
  1612.        > echo =0/calendar
  1613.        /usr/bin/calendar
  1614.        > echo =-
  1615.        /usr/accts/sys
  1616.  
  1617.        The  noglob  and nonomatch shell variables and the expand-
  1618.        glob editor command apply to directory stack  as  well  as
  1619.        filename substitutions.
  1620.  
  1621.    Other substitutions (+)
  1622.        There  are  several  more  transformations involving file-
  1623.        names, not strictly related to  the  above  but    mentioned
  1624.        here  for completeness.    Any filename may be expanded to a
  1625.        full path when the symlinks  variable  (q.v.)  is  set  to
  1626.        `expand'.   Quoting  prevents this expansion, and the nor-
  1627.        malize-path editor command does it on demand.  The normal-
  1628.        ize-command  editor  command expands commands in PATH into
  1629.        full paths on demand.  Finally, cd and pushd interpret `-'
  1630.        as  the    old  working  directory  (equivalent to the shell
  1631.        variable owd).  This is not a substitution at all, but  an
  1632.        abbreviation  recognized  only by those commands. Nonethe-
  1633.        less, it too can be prevented by quoting.
  1634.  
  1635.    Commands
  1636.        The next three sections describe how  the  shell  executes
  1637.        commands and deals with their input and output.
  1638.  
  1639.    Simple commands, pipelines and sequences
  1640.        A  simple  command  is  a  sequence of words, the first of
  1641.        which specifies the command to be executed.  A  series  of
  1642.        simple commands joined by `|' characters forms a pipeline.
  1643.        The output of each command in a pipeline is  connected  to
  1644.        the input of the next.
  1645.  
  1646.  
  1647.  
  1648. Astron 6.07.02         27 October 1996               25
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. TCSH(1)                           TCSH(1)
  1655.  
  1656.  
  1657.        Simple commands and pipelines may be joined into sequences
  1658.        with `;', and will be executed sequentially.  Commands and
  1659.        pipelines  can  also be joined into sequences with `||' or
  1660.        `&&', indicating, as in the C language, that the second is
  1661.        to be executed only if the first fails or succeeds respec-
  1662.        tively.
  1663.  
  1664.        A simple command, pipeline or sequence may  be  placed  in
  1665.        parentheses,  `()', to form a simple command, which may in
  1666.        turn be a component of a pipeline or sequence. A  command,
  1667.        pipeline  or  sequence can be executed without waiting for
  1668.        it to terminate by following it with an `&'.
  1669.  
  1670.    Builtin and non-builtin command execution
  1671.        Builtin commands are executed within the  shell.   If  any
  1672.        component  of a pipeline except the last is a builtin com-
  1673.        mand, the pipeline is executed in a subshell.
  1674.  
  1675.        Parenthesized commands are always executed in a    subshell.
  1676.  
  1677.        (cd; pwd); pwd
  1678.  
  1679.        thus prints the home directory, leaving you where you were
  1680.        (printing this after the home directory), while
  1681.  
  1682.        cd; pwd
  1683.  
  1684.        leaves you in the home directory.  Parenthesized  commands
  1685.        are  most often used to prevent cd from affecting the cur-
  1686.        rent shell.
  1687.  
  1688.        When a command to be executed is found not to be a builtin
  1689.        command    the  shell  attempts  to  execute the command via
  1690.        execve(2).  Each word in the variable path names a  direc-
  1691.        tory  in which the shell will look for the command.  If it
  1692.        is given neither a -c nor a -t option,  the  shell  hashes
  1693.        the  names  in these directories into an internal table so
  1694.        that it will only try an execve(2) in a directory if there
  1695.        is  a  possibility  that  the command resides there.  This
  1696.        greatly speeds command location when  a    large  number  of
  1697.        directories are present in the search path.  If this mech-
  1698.        anism has been turned off (via unhash), if the  shell  was
  1699.        given  a  -c or -t argument or in any case for each direc-
  1700.        tory component of path which does not begin  with  a  `/',
  1701.        the  shell concatenates the current working directory with
  1702.        the given command name to form a path name of a file which
  1703.        it then attempts to execute.
  1704.  
  1705.        If  the    file  has  execute permissions but is not an exe-
  1706.        cutable to the system (i.e. it is  neither  an  executable
  1707.        binary nor a script which specifies its interpreter), then
  1708.        it is assumed to be a file containing shell commands and a
  1709.        new  shell  is spawned to read it. The shell special alias
  1710.        may be set to specify an interpreter other than the  shell
  1711.  
  1712.  
  1713.  
  1714. Astron 6.07.02         27 October 1996               26
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. TCSH(1)                           TCSH(1)
  1721.  
  1722.  
  1723.        itself.
  1724.  
  1725.        On  systems which do not understand the `#!' script inter-
  1726.        preter convention the shell may be compiled to emulate it;
  1727.        see  the  version  shell variable. If so, the shell checks
  1728.        the first line of the file to see if it    is  of    the  form
  1729.        `#!interpreter arg ...'. If it is, the shell starts inter-
  1730.        preter with the given args and feeds the  file  to  it  on
  1731.        standard input.
  1732.  
  1733.    Input/output
  1734.        The standard input and standard output of a command may be
  1735.        redirected with the following syntax:
  1736.  
  1737.        < name  Open file name (which is first  variable,  command
  1738.            and filename expanded) as the standard input.
  1739.        << word Read the shell input up to a line which is identi-
  1740.            cal to word. word is not  subjected  to    variable,
  1741.            filename  or  command substitution, and each input
  1742.            line is compared to word before any  substitutions
  1743.            are  done  on  this  input line.  Unless a quoting
  1744.            `\', `"', `' or ``' appears in word  variable  and
  1745.            command substitution is performed on the interven-
  1746.            ing lines, allowing `\' to quote `$', `\' and ``'.
  1747.            Commands  which    are  substituted have all blanks,
  1748.            tabs, and newlines preserved, except for the final
  1749.            newline    which  is dropped.  The resultant text is
  1750.            placed in an anonymous  temporary  file    which  is
  1751.            given to the command as standard input.
  1752.        > name
  1753.        >! name
  1754.        >& name
  1755.        >&! name
  1756.            The  file name is used as standard output.  If the
  1757.            file does not exist then it  is    created;  if  the
  1758.            file  exists,  its is truncated, its previous con-
  1759.            tents being lost.
  1760.  
  1761.            If the shell variable noclobber is set,    then  the
  1762.            file must not exist or be a character special file
  1763.            (e.g. a    terminal  or  `/dev/null')  or    an  error
  1764.            results.   This    helps prevent accidental destruc-
  1765.            tion of files.  In this case the `!' forms can  be
  1766.            used to suppress this check.
  1767.  
  1768.            The  forms involving `&' route the diagnostic out-
  1769.            put into the specified file as well as  the  stan-
  1770.            dard  output.  name is expanded in the same way as
  1771.            `<' input filenames are.
  1772.        >> name
  1773.        >>& name
  1774.        >>! name
  1775.        >>&! name
  1776.            Like `>', but appends output to the end    of  name.
  1777.  
  1778.  
  1779.  
  1780. Astron 6.07.02         27 October 1996               27
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786. TCSH(1)                           TCSH(1)
  1787.  
  1788.  
  1789.            If the shell variable noclobber is set, then it is
  1790.            an error for the file not to exist, unless one  of
  1791.            the `!' forms is given.
  1792.  
  1793.        A  command receives the environment in which the shell was
  1794.        invoked as modified by the input-output parameters and the
  1795.        presence  of the command in a pipeline.    Thus, unlike some
  1796.        previous shells, commands run from a file  of  shell  com-
  1797.        mands  have  no    access    to  the  text  of the commands by
  1798.        default; rather they receive the original  standard  input
  1799.        of  the    shell.    The `<<' mechanism should be used to pre-
  1800.        sent inline data.  This permits shell command  scripts  to
  1801.        function  as  components of pipelines and allows the shell
  1802.        to block read its input.  Note that the    default  standard
  1803.        input  for  a  command  run detached is not the empty file
  1804.        /dev/null, but the original standard input of  the  shell.
  1805.        If  this is a terminal and if the process attempts to read
  1806.        from the terminal, then the process  will  block  and  the
  1807.        user will be notified (see Jobs).
  1808.  
  1809.        Diagnostic  output may be directed through a pipe with the
  1810.        standard output.  Simply use the  form  `|&'  rather  than
  1811.        just `|'.
  1812.  
  1813.        The  shell  cannot  presently  redirect    diagnostic output
  1814.        without also redirecting standard output, but `(command    >
  1815.        output-file)   >&   error-file'    is  often  an  acceptable
  1816.        workaround.   Either  output-file  or  error-file  may  be
  1817.        `/dev/tty' to send output to the terminal.
  1818.  
  1819.    Features
  1820.        Having  described  how  the shell accepts, parses and exe-
  1821.        cutes command lines, we now turn to a variety of its  use-
  1822.        ful features.
  1823.  
  1824.    Control flow
  1825.        The  shell contains a number of commands which can be used
  1826.        to regulate the flow of control in  command  files  (shell
  1827.        scripts)  and  (in  limited but useful ways) from terminal
  1828.        input.  These commands all operate by forcing the shell to
  1829.        reread  or  skip  in its input and, due to the implementa-
  1830.        tion, restrict the placement of some of the commands.
  1831.  
  1832.        The foreach, switch, and while statements, as well as  the
  1833.        if-then-else  form  of  the if statement, require that the
  1834.        major keywords appear in a single  simple  command  on  an
  1835.        input line as shown below.
  1836.  
  1837.        If the shell's input is not seekable, the shell buffers up
  1838.        input whenever a loop is being read and performs seeks  in
  1839.        this  internal  buffer to accomplish the rereading implied
  1840.        by the loop.  (To the extent that  this    allows,  backward
  1841.        gotos will succeed on non-seekable inputs.)
  1842.  
  1843.  
  1844.  
  1845.  
  1846. Astron 6.07.02         27 October 1996               28
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852. TCSH(1)                           TCSH(1)
  1853.  
  1854.  
  1855.    Expressions
  1856.        The  if,  while    and exit builtin commands use expressions
  1857.        with a common syntax. The expressions can include  any  of
  1858.        the  operators  described in the next three sections. Note
  1859.        that the @ builtin command (q.v.)  has  its  own  separate
  1860.        syntax.
  1861.  
  1862.    Logical, arithmetical and comparison operators
  1863.        These  operators  are  similar  to those of C and have the
  1864.        same precedence.  They include
  1865.  
  1866.        ||  &&  |  ^  &  ==    !=  =~    !~  <=    >=
  1867.        <  > <<  >>    +  -  *  /  %  !  ~  (    )
  1868.  
  1869.        Here the precedence increases to the right, `==' `!=' `=~'
  1870.        and  `!~',  `<='  `>=' `<' and `>', `<<' and `>>', `+' and
  1871.        `-', `*' `/' and `%' being, in groups, at the same  level.
  1872.        The  `==' `!=' `=~' and `!~' operators compare their argu-
  1873.        ments as strings; all  others  operate  on  numbers.   The
  1874.        operators `=~' and `!~' are like `!=' and `==' except that
  1875.        the right hand side is a glob-pattern (see  Filename  sub-
  1876.        stitution) against which the left hand operand is matched.
  1877.        This reduces the need for use of the switch  builtin  com-
  1878.        mand  in  shell    scripts when all that is really needed is
  1879.        pattern matching.
  1880.  
  1881.        Strings which begin with `0' are considered octal numbers.
  1882.        Null or missing arguments are considered `0'.  The results
  1883.        of all expressions are strings,    which  represent  decimal
  1884.        numbers.   It  is important to note that no two components
  1885.        of an expression can appear in the same word; except  when
  1886.        adjacent  to components of expressions which are syntacti-
  1887.        cally significant to the parser (`&' `|' `<' `>' `('  `)')
  1888.        they should be surrounded by spaces.
  1889.  
  1890.    Command exit status
  1891.        Commands  can  be  executed  in expressions and their exit
  1892.        status returned by enclosing them in braces (`{}'). Remem-
  1893.        ber  that the braces should be separated from the words of
  1894.        the command by spaces. Command executions succeed, return-
  1895.        ing  true,  i.e.  `1', if the command exits with status 0,
  1896.        otherwise they fail, returning false, i.e. `0'.     If  more
  1897.        detailed  status  information is required then the command
  1898.        should be executed outside of an expression and the status
  1899.        shell variable examined.
  1900.  
  1901.    File inquiry operators
  1902.        Some  of these operators perform true/false tests on files
  1903.        and related objects. They are of the form -op file,  where
  1904.        op is one of
  1905.  
  1906.        r   Read access
  1907.        w   Write access
  1908.        x   Execute access
  1909.  
  1910.  
  1911.  
  1912. Astron 6.07.02         27 October 1996               29
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. TCSH(1)                           TCSH(1)
  1919.  
  1920.  
  1921.        X   Executable  in the path or shell builtin, e.g. `-X
  1922.            ls' and `-X ls-F'  are  generally  true,  but  `-X
  1923.            /bin/ls' is not (+)
  1924.        e   Existence
  1925.        o   Ownership
  1926.        z   Zero size
  1927.        s   Non-zero size (+)
  1928.        f   Plain file
  1929.        d   Directory
  1930.        l   Symbolic link (+) *
  1931.        b   Block special file (+)
  1932.        c   Character special file (+)
  1933.        p   Named pipe (fifo) (+) *
  1934.        S   Socket special file (+) *
  1935.        u   Set-user-ID bit is set (+)
  1936.        g   Set-group-ID bit is set (+)
  1937.        k   Sticky bit is set (+)
  1938.        t   file  (which  must  be  a  digit)  is an open file
  1939.            descriptor for a terminal device (+)
  1940.        R   Has been migrated (convex only) (+)
  1941.        L   Applies    subsequent  operators  in   a    multiple-
  1942.            operator  test  to  a symbolic link rather than to
  1943.            the file to which the link points (+) *
  1944.  
  1945.        file is command and filename expanded and then  tested  to
  1946.        see if it has the specified relationship to the real user.
  1947.        If file does not exist or  is  inaccessible  or,  for  the
  1948.        operators  indicated  by  `*',  if the specified file type
  1949.        does not exist on the current system, then  all    enquiries
  1950.        return false, i.e. `0'.
  1951.  
  1952.        These  operators  may  be  combined  for conciseness: `-xy
  1953.        file' is equivalent to `-x file && -y file'. (+) For exam-
  1954.        ple,  `-fx'  is    true  (returns    `1') for plain executable
  1955.        files, but not for directories.
  1956.  
  1957.        L may be used in a multiple-operator test to apply  subse-
  1958.        quent operators to a symbolic link rather than to the file
  1959.        to which the link points.  For example, `-lLo' is true for
  1960.        links  owned  by  the  invoking    user.    Lr, Lw and Lx are
  1961.        always true for links and false for  non-links.    L  has    a
  1962.        different meaning when it is the last operator in a multi-
  1963.        ple-operator test; see below.
  1964.  
  1965.        It is possible but not useful, and  sometimes  misleading,
  1966.        to  combine  operators which expect file to be a file with
  1967.        operators which do not, (e.g. X and t). Following L with a
  1968.        non-file   operator   can  lead    to  particularly  strange
  1969.        results.
  1970.  
  1971.        Other operators return other information,  i.e.    not  just
  1972.        `0'  or    `1'.  (+) They have the same format as before; op
  1973.        may be one of
  1974.  
  1975.  
  1976.  
  1977.  
  1978. Astron 6.07.02         27 October 1996               30
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. TCSH(1)                           TCSH(1)
  1985.  
  1986.  
  1987.        A       Last file access time, as the number  of  sec-
  1988.            onds since the epoch
  1989.        A:       Like A, but in timestamp format, e.g. `Fri May
  1990.            14 16:36:10 1993'
  1991.        M       Last file modification time
  1992.        M:       Like M, but in timestamp format
  1993.        C       Last inode modification time
  1994.        C:       Like C, but in timestamp format
  1995.        D       Device number
  1996.        I       Inode number
  1997.        F       Composite  file  identifier,   in   the   form
  1998.            device:inode
  1999.        L       The    name of the file pointed to by a symbolic
  2000.            link
  2001.        N       Number of (hard) links
  2002.        P       Permissions, in octal, without leading zero
  2003.        P:       Like P, with leading zero
  2004.        Pmode   Equivalent to `-P file  &  mode',  e.g.  `-P22
  2005.            file'  returns  `22'  if  file  is writable by
  2006.            group and other, `20' if by    group  only,  and
  2007.            `0' if by neither
  2008.        Pmode:  Like Pmode:, with leading zero
  2009.        U       Numeric userid
  2010.        U:       Username,  or  the numeric userid if the user-
  2011.            name is unknown
  2012.        G       Numeric groupid
  2013.        G:       Groupname,  or  the    numeric  groupid  if  the
  2014.            groupname is unknown
  2015.        Z       Size, in bytes
  2016.  
  2017.        Only  one  of  these  operators    may appear in a multiple-
  2018.        operator test, and it must be the last. Note that L has    a
  2019.        different  meaning at the end of and elsewhere in a multi-
  2020.        ple-operator test. Because `0' is a valid return value for
  2021.        many  of these operators, they do not return `0' when they
  2022.        fail: most return `-1', and F returns `:'.
  2023.  
  2024.        If the shell is compiled with POSIX defined (see the  ver-
  2025.        sion  shell  variable),    the  result  of a file inquiry is
  2026.        based on the permission bits of the file and  not  on  the
  2027.        result  of the access(2) system call.  For example, if one
  2028.        tests a file with -w whose  permissions    would  ordinarily
  2029.        allow  writing but which is on a file system mounted read-
  2030.        only, the test will succeed in a POSIX shell but fail in a
  2031.        non-POSIX shell.
  2032.  
  2033.        File  inquiry  operators  can  also  be evaluated with the
  2034.        filetest builtin command (q.v.) (+).
  2035.  
  2036.    Jobs
  2037.        The shell associates a job with each pipeline.  It keeps a
  2038.        table  of  current  jobs, printed by the jobs command, and
  2039.        assigns them small integer numbers.  When a job is started
  2040.        asynchronously  with  `&',  the    shell prints a line which
  2041.  
  2042.  
  2043.  
  2044. Astron 6.07.02         27 October 1996               31
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050. TCSH(1)                           TCSH(1)
  2051.  
  2052.  
  2053.        looks like
  2054.  
  2055.        [1] 1234
  2056.  
  2057.        indicating that the job which was  started  asynchronously
  2058.        was  job  number  1 and had one (top-level) process, whose
  2059.        process id was 1234.
  2060.  
  2061.        If you are running a job and wish to do something else you
  2062.        may hit the suspend key (usually `^Z'), which sends a STOP
  2063.        signal to the current job.  The shell will  then  normally
  2064.        indicate  that  the  job  has  been  `Suspended' and print
  2065.        another prompt.    If the listjobs shell  variable  is  set,
  2066.        all  jobs will be listed like the jobs builtin command; if
  2067.        it is set to `long' the listing will be    in  long  format,
  2068.        like  `jobs -l'.  You can then manipulate the state of the
  2069.        suspended job.  You can put it in the ``background''  with
  2070.        the  bg    command or run some other commands and eventually
  2071.        bring the job back into the ``foreground'' with fg.   (See
  2072.        also  the  run-fg-editor  editor  command.)   A `^Z' takes
  2073.        effect immediately and is like an interrupt in that  pend-
  2074.        ing  output  and  unread  input    are  discarded when it is
  2075.        typed.  The wait builtin command causes the shell to  wait
  2076.        for all background jobs to complete.
  2077.  
  2078.        The  `^]'  key  sends a delayed suspend signal, which does
  2079.        not generate a STOP signal until  a  program  attempts  to
  2080.        read(2)    it,  to  the  current  job.  This can usefully be
  2081.        typed ahead when you have prepared some commands for a job
  2082.        which  you  wish to stop after it has read them.  The `^Y'
  2083.        key performs this function in csh(1); in tcsh, `^Y' is  an
  2084.        editing command. (+)
  2085.  
  2086.        A  job  being  run  in the background stops if it tries to
  2087.        read from the  terminal.   Background  jobs  are  normally
  2088.        allowed    to  produce  output,  but this can be disabled by
  2089.        giving the command `stty tostop'.  If  you  set    this  tty
  2090.        option,    then  background  jobs will stop when they try to
  2091.        produce output like they do when they try to read input.
  2092.  
  2093.        There are several ways to refer to jobs in the shell.  The
  2094.        character `%' introduces a job name.  If you wish to refer
  2095.        to job number 1, you can name it as `%1'.  Just    naming    a
  2096.        job  brings  it    to the foreground; thus `%1' is a synonym
  2097.        for `fg %1', bringing job  1  back  into  the  foreground.
  2098.        Similarly,  saying `%1 &' resumes job 1 in the background,
  2099.        just like `bg %1'. A job can also be  named  by    an  unam-
  2100.        bigous  prefix  of  the string typed in to start it: `%ex'
  2101.        would normally restart a suspended  ex(1)  job,    if  there
  2102.        were  only  one    suspended  job    whose name began with the
  2103.        string `ex'.  It is also possible  to  say  `%?string'  to
  2104.        specify a job whose text contains string, if there is only
  2105.        one such job.
  2106.  
  2107.  
  2108.  
  2109.  
  2110. Astron 6.07.02         27 October 1996               32
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116. TCSH(1)                           TCSH(1)
  2117.  
  2118.  
  2119.        The shell maintains a notion of the current  and  previous
  2120.        jobs.   In  output  pertaining to jobs, the current job is
  2121.        marked with a `+' and the previous job with  a  `-'.   The
  2122.        abbreviations  `%+',  `%', and (by analogy with the syntax
  2123.        of the history mechanism) `%%' all refer  to  the  current
  2124.        job, and `%-' refers to the previous job.
  2125.  
  2126.        The job control mechanism requires that the stty(1) option
  2127.        `new' be set on some systems.  It is an    artifact  from    a
  2128.        `new' implementation of the tty driver which allows gener-
  2129.        ation of interrupt characters from the  keyboard  to  tell
  2130.        jobs  to  stop.    See stty(1) and the setty builtin command
  2131.        for details on setting options in the new tty driver.
  2132.  
  2133.    Status reporting
  2134.        The shell learns immediately whenever  a  process  changes
  2135.        state.    It  normally  informs  you whenever a job becomes
  2136.        blocked so that no further progress is possible, but  only
  2137.        just  before  it prints a prompt.  This is done so that it
  2138.        does not otherwise disturb your work.   If,  however,  you
  2139.        set  the  shell variable notify, the shell will notify you
  2140.        immediately of  changes    of  status  in    background  jobs.
  2141.        There  is also a shell command notify which marks a single
  2142.        process so that its status  changes  will  be  immediately
  2143.        reported.   By  default    notify marks the current process;
  2144.        simply say `notify' after starting  a  background  job  to
  2145.        mark it.
  2146.  
  2147.        When  you  try  to leave the shell while jobs are stopped,
  2148.        you will be warned that `You have stopped jobs.'  You  may
  2149.        use the jobs command to see what they are.  If you do this
  2150.        or immediately try to exit again, the shell will not  warn
  2151.        you  a  second time, and the suspended jobs will be termi-
  2152.        nated.
  2153.  
  2154.    Automatic, periodic and timed events (+)
  2155.        There are various ways to  run  commands  and  take  other
  2156.        actions    automatically  at  various  times  in  the ``life
  2157.        cycle'' of  the    shell.    They  are  summarized  here,  and
  2158.        described  in  detail  under  the appropriate Builtin com-
  2159.        mands, Special shell variables and Special aliases.
  2160.  
  2161.        The sched builtin command puts commands    in  a  scheduled-
  2162.        event list, to be executed by the shell at a given time.
  2163.  
  2164.        The  beepcmd,  cwdcmd, periodic and precmd Special aliases
  2165.        can be set, respectively, to  execute  commands    when  the
  2166.        shell  wants  to ring the bell, when the working directory
  2167.        changes, every tperiod minutes and before each prompt.
  2168.  
  2169.        The autologout shell variable can be set  to  log  out  or
  2170.        lock the shell after a given number of minutes of inactiv-
  2171.        ity.
  2172.  
  2173.  
  2174.  
  2175.  
  2176. Astron 6.07.02         27 October 1996               33
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182. TCSH(1)                           TCSH(1)
  2183.  
  2184.  
  2185.        The mail shell variable can be set to check for    new  mail
  2186.        periodically.
  2187.  
  2188.        The  printexitvalue shell variable can be set to print the
  2189.        exit status of commands which exit  with  a  status  other
  2190.        than zero.
  2191.  
  2192.        The rmstar shell variable can be set to ask the user, when
  2193.        `rm *' is typed, if that is really what was meant.
  2194.  
  2195.        The time shell variable can be set  to  execute    the  time
  2196.        builtin    command  after the completion of any process that
  2197.        takes more than a given number of CPU seconds.
  2198.  
  2199.        The watch and who shell variables can  be  set  to  report
  2200.        when  selected  users  log  in or out, and the log builtin
  2201.        command reports on those users at any time.
  2202.  
  2203.    Native Language System support (+)
  2204.        The shell is eight bit clean (if so compiled; see the ver-
  2205.        sion  shell  variable)  and  thus  supports character sets
  2206.        needing this capability.  NLS support differs depending on
  2207.        whether    or not the shell was compiled to use the system's
  2208.        NLS (again, see version).  In either case, 7-bit ASCII  is
  2209.        the default for character classification (e.g. which char-
  2210.        acters are printable) and sorting, and changing    the  LANG
  2211.        or  LC_CTYPE environment variables causes a check for pos-
  2212.        sible changes in these respects.
  2213.  
  2214.        When using the system's NLS, the setlocale(3) function  is
  2215.        called  to  determine appropriate character classification
  2216.        and sorting.  This function typically  examines    the  LANG
  2217.        and  LC_CTYPE  environment  variables; refer to the system
  2218.        documentation for further details.   When  not  using  the
  2219.        system's  NLS, the shell simulates it by assuming that the
  2220.        ISO 8859-1 character set is used whenever  either  of  the
  2221.        LANG  and  LC_CTYPE variables are set, regardless of their
  2222.        values. Sorting is not affected for the simulated NLS.
  2223.  
  2224.        In addition, with both real and simulated NLS, all  print-
  2225.        able  characters  in  the range \200-\377, i.e. those that
  2226.        have M-char bindings, are automatically rebound    to  self-
  2227.        insert-command.    The corresponding binding for the escape-
  2228.        char sequence, if any, is left  alone.    These  characters
  2229.        are  not  rebound  if the NOREBIND environment variable is
  2230.        set. This may be useful for the simulated NLS or a  primi-
  2231.        tive  real  NLS    which assumes full ISO 8859-1. Otherwise,
  2232.        all M-char bindings in the range \240-\377 are effectively
  2233.        undone.    Explicitly rebinding the relevant keys with bind-
  2234.        key is of course still possible.
  2235.  
  2236.        Unknown characters (i.e. those that are neither    printable
  2237.        nor  control  characters)  are printed in the format \nnn.
  2238.        If the tty is not in 8 bit mode, other  8  bit  characters
  2239.  
  2240.  
  2241.  
  2242. Astron 6.07.02         27 October 1996               34
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248. TCSH(1)                           TCSH(1)
  2249.  
  2250.  
  2251.        are printed by converting them to ASCII and using standout
  2252.        mode. The shell never changes the 7/8 bit mode of the  tty
  2253.        and  tracks  user-initiated  changes  of 7/8 bit mode. NLS
  2254.        users (or, for that matter, those who want to use  a  meta
  2255.        key)  may  need    to  explicitly    set the tty in 8 bit mode
  2256.        through the appropriate    stty(1)  command  in,  e.g.,  the
  2257.        ~/.login file.
  2258.  
  2259.    OS variant support (+)
  2260.        A  number  of new builtin commands are provided to support
  2261.        features  in  particular  operating   systems.    All   are
  2262.        described in detail in the Builtin commands section.
  2263.  
  2264.        On   systems   that  support  TCF  (aix-ibm370,    aix-ps2),
  2265.        getspath and setspath get and  set  the    system    execution
  2266.        path,  getxvers    and setxvers get and set the experimental
  2267.        version prefix  and  migrate  migrates  processes  between
  2268.        sites.  The jobs builtin prints the site on which each job
  2269.        is executing.
  2270.  
  2271.        Under Domain/OS, inlib adds shared libraries to    the  cur-
  2272.        rent  environment,  rootnode  changes the rootnode and ver
  2273.        changes the systype.
  2274.  
  2275.        Under Mach, setpath is equivalent to Mach's setpath(1).
  2276.  
  2277.        Under Masscomp/RTU and Harris  CX/UX,  universe    sets  the
  2278.        universe.
  2279.  
  2280.        Under  Harris  CX/UX,  ucb or att runs a command under the
  2281.        specified universe.
  2282.  
  2283.        Under Convex/OS, warp prints or sets the universe.
  2284.  
  2285.        The VENDOR,  OSTYPE  and  MACHTYPE  environment    variables
  2286.        indicate  respectively  the  vendor,  operating system and
  2287.        machine type (microprocessor class or  machine  model)  of
  2288.        the system on which the shell thinks it is running.  These
  2289.        are particularly useful when sharing one's home    directory
  2290.        between several types of machines; one can, for example,
  2291.  
  2292.        set    path = (~/bin.$MACHTYPE /usr/ucb /bin /usr/bin .)
  2293.  
  2294.        in one's ~/.login and put executables  compiled    for  each
  2295.        machine in the appropriate directory.
  2296.  
  2297.        The  version  shell  variable  indicates what options were
  2298.        chosen when the shell was compiled.
  2299.  
  2300.        Note also the newgrp builtin, the afsuser  and  echo_style
  2301.        shell  variables and the system-dependent locations of the
  2302.        shell's input files (see FILES).
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308. Astron 6.07.02         27 October 1996               35
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314. TCSH(1)                           TCSH(1)
  2315.  
  2316.  
  2317.    Signal handling
  2318.        Login shells  ignore  interrupts  when  reading    the  file
  2319.        ~/.logout.   The shell ignores quit signals unless started
  2320.        with -q.  Login shells catch  the  terminate  signal,  but
  2321.        non-login shells inherit the terminate behavior from their
  2322.        parents.  Other signals have the values    which  the  shell
  2323.        inherited from its parent.
  2324.  
  2325.        In  shell  scripts,  the shell's handling of interrupt and
  2326.        terminate signals can be controlled with onintr,  and  its
  2327.        handling  of hangups can be controlled with hup and nohup.
  2328.  
  2329.        The shell exits on a hangup (see  also  the  logout  shell
  2330.        variable).   By    default, the shell's children do too, but
  2331.        the shell does not send them a hangup when it exits.   hup
  2332.        arranges for the shell to send a hangup to a child when it
  2333.        exits, and nohup sets a child to ignore hangups.
  2334.  
  2335.    Terminal management (+)
  2336.        The shell uses three different sets of terminal    (``tty'')
  2337.        modes: `edit', used when editing, `quote', used when quot-
  2338.        ing literal characters, and `execute', used when executing
  2339.        commands.  The shell holds some settings in each mode con-
  2340.        stant, so commands which leave the tty in a confused state
  2341.        do  not    interfere with the shell.  The shell also matches
  2342.        changes in the speed and padding of the tty.  The list  of
  2343.        tty modes that are kept constant can be examined and modi-
  2344.        fied with the setty builtin.  Note that although the  edi-
  2345.        tor  uses CBREAK mode (or its equivalent), it takes typed-
  2346.        ahead characters anyway.
  2347.  
  2348.        The echotc, settc and  telltc  commands    can  be  used  to
  2349.        manipulate  and    debug terminal capabilities from the com-
  2350.        mand line.
  2351.  
  2352.        On systems that support SIGWINCH or SIGWINDOW,  the  shell
  2353.        adapts  to  window  resizing automatically and adjusts the
  2354.        environment variables LINES and COLUMNS    if  set.  If  the
  2355.        environment  variable TERMCAP contains li# and co# fields,
  2356.        the shell adjusts them to reflect the new window size.
  2357.  
  2358. REFERENCE
  2359.        The next sections of  this  manual  describe  all  of  the
  2360.        available  Builtin  commands,  Special aliases and Special
  2361.        shell variables.
  2362.  
  2363.    Builtin commands
  2364.        %job    A synonym for the fg builtin command.
  2365.  
  2366.        %job &  A synonym for the bg builtin command.
  2367.  
  2368.        :       Does nothing, successfully.
  2369.  
  2370.        @
  2371.  
  2372.  
  2373.  
  2374. Astron 6.07.02         27 October 1996               36
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380. TCSH(1)                           TCSH(1)
  2381.  
  2382.  
  2383.        @ name = expr
  2384.        @ name[index] = expr
  2385.        @ name++|--
  2386.        @ name[index]++|--
  2387.            The first form prints  the  values  of  all  shell
  2388.            variables.
  2389.  
  2390.            The second form assigns the value of expr to name.
  2391.            The third form assigns the value of  expr  to  the
  2392.            index'th  component  of    name;  both  name and its
  2393.            index'th component must already exist.
  2394.  
  2395.            expr may contain the operators `*', `+',  etc.  as
  2396.            in  C.    If expr contains `<', `>', `&' or `' then
  2397.            at least that part of expr must be  placed  within
  2398.            `()'.  Note that the syntax of expr has nothing to
  2399.            do with that described under Expressions.
  2400.  
  2401.            The fourth and fifth  forms  increment  (`++')  or
  2402.            decrement (`--') name or its index'th component.
  2403.  
  2404.            The  space  between `@' and name is required.  The
  2405.            spaces between name and `=' and    between  `='  and
  2406.            expr  are  optional.   Components  of expr must be
  2407.            separated by spaces.
  2408.  
  2409.        alias [name [wordlist]]
  2410.            Without arguments, prints all aliases.  With name,
  2411.            prints    the   alias  for  name.   With    name  and
  2412.            wordlist, assigns wordlist as the alias    of  name.
  2413.            wordlist  is  command  and  filename  substituted.
  2414.            name may not be `alias' or  `unalias'.    See  also
  2415.            the unalias builtin command.
  2416.  
  2417.        alloc   Shows  the amount of dynamic memory acquired, bro-
  2418.            ken down into used and free memory.  With an argu-
  2419.            ment  shows  the number of free and used blocks in
  2420.            each size category.  The categories start at  size
  2421.            8  and double at each step.  This command's output
  2422.            may vary across system types, since systems  other
  2423.            than the VAX may use a different memory allocator.
  2424.  
  2425.        bg [%job ...]
  2426.            Puts the specified jobs    (or,  without  arguments,
  2427.            the  current  job) into the background, continuing
  2428.            each if it is stopped.  job may    be  a  number,    a
  2429.            string,    `',  `%',  `+'    or `-' as described under
  2430.            Jobs.
  2431.  
  2432.        bindkey [-l|-d|-e|-v|-u] (+)
  2433.        bindkey [-a] [-b] [-k] [-r] [--] key (+)
  2434.        bindkey [-a] [-b] [-k] [-c|-s] [--] key command (+)
  2435.            Without options, the first form    lists  all  bound
  2436.            keys  and  the  editor  command    to  which each is
  2437.  
  2438.  
  2439.  
  2440. Astron 6.07.02         27 October 1996               37
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446. TCSH(1)                           TCSH(1)
  2447.  
  2448.  
  2449.            bound, the second form lists the editor command to
  2450.            which  key  is  bound and the third form binds the
  2451.            editor command command to key.  Options include:
  2452.  
  2453.            -l  Lists all editor commands and a short descrip-
  2454.            tion of each.
  2455.            -d  Binds  all  keys  to the standard bindings for
  2456.            the default editor.
  2457.            -e  Binds all keys to the standard GNU  Emacs-like
  2458.            bindings.
  2459.            -v  Binds  all  keys  to  the  standard vi(1)-like
  2460.            bindings.
  2461.            -a  Lists or changes key-bindings in the  alterna-
  2462.            tive  key map.  This is the key map used in vi
  2463.            command mode.
  2464.            -b  key is  interpreted    as  a  control    character
  2465.            written  ^character (e.g. `^A') or C-character
  2466.            (e.g. `C-A'),  a  meta  character  written  M-
  2467.            character (e.g. `M-A'), a function key written
  2468.            F-string (e.g.  `F-string'),  or  an  extended
  2469.            prefix key written X-character (e.g. `X-A').
  2470.            -k  key    is  interpreted  as  a symbolic arrow key
  2471.            name, which may be one of `down', `up', `left'
  2472.            or `right'.
  2473.            -r  Removes  key's  binding.  Be careful: `bindkey
  2474.            -r' does not bind key  to  self-insert-command
  2475.            (q.v.), it unbinds key completely.
  2476.            -c  command  is interpreted as a builtin or exter-
  2477.            nal command instead of an editor command.
  2478.            -s  command is  taken  as  a  literal  string  and
  2479.            treated  as    terminal input when key is typed.
  2480.            Bound keys in command are themselves  reinter-
  2481.            preted,  and  this continues for ten levels of
  2482.            interpretation.
  2483.            --  Forces a break from option processing, so  the
  2484.            next  word  is  taken as key even if it begins
  2485.            with '-'.
  2486.            -u (or any invalid option)
  2487.            Prints a usage message.
  2488.  
  2489.            key may be a single character or a string.   If    a
  2490.            command    is bound to a string, the first character
  2491.            of the string is bound to sequence-lead-in and the
  2492.            entire string is bound to the command.
  2493.  
  2494.            Control characters in key can be literal (they can
  2495.            be typed by preceding them with the editor command
  2496.            quoted-insert,  normally bound to `^V') or written
  2497.            caret-character style, e.g. `^A'. Delete is  writ-
  2498.            ten  `^?'  (caret-question mark).  key and command
  2499.            can contain backslashed escape sequences  (in  the
  2500.            style of System V echo(1)) as follows:
  2501.  
  2502.            \a       Bell
  2503.  
  2504.  
  2505.  
  2506. Astron 6.07.02         27 October 1996               38
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512. TCSH(1)                           TCSH(1)
  2513.  
  2514.  
  2515.            \b       Backspace
  2516.            \e       Escape
  2517.            \f       Form feed
  2518.            \n       Newline
  2519.            \r       Carriage return
  2520.            \t       Horizontal tab
  2521.            \v       Vertical tab
  2522.            \nnn    The    ASCII  character corresponding to
  2523.                the octal number nnn
  2524.  
  2525.            `\' nullifies the special meaning of the following
  2526.            character, if it has any, notably `\' and `^'.
  2527.  
  2528.        break   Causes  execution  to  resume after the end of the
  2529.            nearest enclosing foreach or while. The    remaining
  2530.            commands on the current line are executed.  Multi-
  2531.            level breaks are thus possible by writing them all
  2532.            on one line.
  2533.  
  2534.        breaksw Causes  a  break from a switch, resuming after the
  2535.            endsw.
  2536.  
  2537.        builtins (+)
  2538.            Prints the names of all builtin commands.
  2539.  
  2540.        bye (+) A synonym for the logout builtin command.   Avail-
  2541.            able  only  if  the shell was so compiled; see the
  2542.            version shell variable.
  2543.  
  2544.        case label:
  2545.            A label in a switch statement as discussed  below.
  2546.  
  2547.        cd [-p] [-l] [-n|-v] [name]
  2548.            If  a directory name is given, changes the shell's
  2549.            working directory to  name.  If    not,  changes  to
  2550.            home.   If  name  is  `-' it is interpreted as the
  2551.            previous working directory  (see  Other    substitu-
  2552.            tions).    (+)  If name is not a subdirectory of the
  2553.            current directory (and does not    begin  with  `/',
  2554.            `./'  or  `../'),  each    component of the variable
  2555.            cdpath is checked to see if it has a  subdirectory
  2556.            name.  Finally,    if  all  else fails but name is a
  2557.            shell variable whose value begins with  `/',  then
  2558.            this is tried to see if it is a directory.
  2559.  
  2560.            With  -p,  prints  the final directory stack, just
  2561.            like dirs.  The -l, -n and -v flags have the  same
  2562.            effect on cd as on dirs, and they imply -p. (+)
  2563.  
  2564.            See also the implicitcd shell variable.
  2565.  
  2566.        chdir   A synonym for the cd builtin command.
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572. Astron 6.07.02         27 October 1996               39
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578. TCSH(1)                           TCSH(1)
  2579.  
  2580.  
  2581.        complete  [command
  2582.            [word/pattern/list[:select]/[[suffix]/] ...]] (+)
  2583.            Without    arguments,  lists  all completions.  With
  2584.            command, lists completions for command.    With com-
  2585.            mand and word etc., defines completions.
  2586.  
  2587.            command    may  be  a  full  command name or a glob-
  2588.            pattern (see Filename substitution). It can  begin
  2589.            with  `-'  to  indicate    that completion should be
  2590.            used only when command is ambiguous.
  2591.  
  2592.            word specifies which word relative to the  current
  2593.            word  is  to  be  completed, and may be one of the
  2594.            following:
  2595.  
  2596.            c   Current-word  completion.   pattern  is    a
  2597.                glob-pattern  which  must match the begin-
  2598.                ning of the current word  on  the  command
  2599.                line.  pattern  is ignored when completing
  2600.                the current word.
  2601.            C   Like c, but includes pattern when complet-
  2602.                ing the current word.
  2603.            n   Next-word  completion.  pattern is a glob-
  2604.                pattern which must match the beginning  of
  2605.                the previous word on the command line.
  2606.            N   Like  n,  but  must match the beginning of
  2607.                the word two before the current word.
  2608.            p   Position-dependent completion.  pattern is
  2609.                a numeric range, with the same syntax used
  2610.                to  index  shell  variables,  which   must
  2611.                include the current word.
  2612.  
  2613.            list, the list of possible completions, may be one
  2614.            of the following:
  2615.  
  2616.            a       Aliases
  2617.            b       Bindings (editor commands)
  2618.            c       Commands  (builtin  or  external  com-
  2619.                mands)
  2620.            C       External commands which begin with the
  2621.                supplied path prefix
  2622.            d       Directories
  2623.            D       Directories which begin with the  sup-
  2624.                plied path prefix
  2625.            e       Environment variables
  2626.            f       Filenames
  2627.            F       Filenames  which  begin  with the sup-
  2628.                plied path prefix
  2629.            g       Groupnames
  2630.            j       Jobs
  2631.            l       Limits
  2632.            n       Nothing
  2633.            s       Shell variables
  2634.            S       Signals
  2635.  
  2636.  
  2637.  
  2638. Astron 6.07.02         27 October 1996               40
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644. TCSH(1)                           TCSH(1)
  2645.  
  2646.  
  2647.            t       Plain (``text'') files
  2648.            T       Plain  (``text'')  files  which  begin
  2649.                with the supplied path prefix
  2650.            v       Any variables
  2651.            u       Usernames
  2652.            x       Like  n,  but prints select when list-
  2653.                choices is used.
  2654.            X       Completions
  2655.            $var    Words from the variable var
  2656.            (...)   Words from the given list
  2657.            `...`   Words from the output of command
  2658.  
  2659.            select is an  optional  glob-pattern.   If  given,
  2660.            only  words  from list which match select are con-
  2661.            sidered and the fignore shell variable is ignored.
  2662.            The  last three types of completion may not have a
  2663.            select pattern, and x uses select as  an  explana-
  2664.            tory  message when the list-choices editor command
  2665.            is used.
  2666.  
  2667.            suffix is a single character to be appended  to    a
  2668.            successful  completion.     If null, no character is
  2669.            appended. If omitted (in  which    case  the  fourth
  2670.            delimiter   can    also  be  omitted),  a    slash  is
  2671.            appended to  directories  and  a  space    to  other
  2672.            words.
  2673.  
  2674.            Now  for  some  examples.  Some commands take only
  2675.            directories as arguments, so there's no point com-
  2676.            pleting plain files.
  2677.  
  2678.            > complete cd 'p/1/d/'
  2679.  
  2680.            completes  only    the  first  word  following  `cd'
  2681.            (`p/1') with a directory.  p-type  completion  can
  2682.            also be used to narrow down command completion:
  2683.  
  2684.            > co[^D]
  2685.            complete compress
  2686.            > complete -co* 'p/0/(compress)/'
  2687.            > co[^D]
  2688.            > compress
  2689.  
  2690.            This completion completes commands (words in posi-
  2691.            tion 0, `p/0') which begin with `co' (thus  match-
  2692.            ing  `co*')  to    `compress'  (the only word in the
  2693.            list).  The leading `-' indicates that  this  com-
  2694.            pletion    is  to    be  used only with ambiguous com-
  2695.            mands.
  2696.  
  2697.            > complete find 'n/-user/u/'
  2698.  
  2699.            is an example of n-type completion. Any word  fol-
  2700.            lowing `find' and immediately following `-user' is
  2701.  
  2702.  
  2703.  
  2704. Astron 6.07.02         27 October 1996               41
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710. TCSH(1)                           TCSH(1)
  2711.  
  2712.  
  2713.            completed from the list of users.
  2714.  
  2715.            > complete cc 'c/-I/d/'
  2716.  
  2717.            demonstrates c-type completion. Any word following
  2718.            `cc'  and  beginning  with  `-I' is completed as a
  2719.            directory. `-I' is not taken as part of the direc-
  2720.            tory because we used lowercase c.
  2721.  
  2722.            Different  lists  are  useful  with different com-
  2723.            mands.
  2724.  
  2725.            > complete alias 'p/1/a/'
  2726.            > complete man 'p/*/c/'
  2727.            > complete set 'p/1/s/'
  2728.            > complete true 'p/1/x:Truth has no options./'
  2729.  
  2730.            These   complete   words  following  `alias'  with
  2731.            aliases, `man' with commands, and `set' with shell
  2732.            variables.   `true' doesn't have any options, so x
  2733.            does nothing  when  completion  is  attempted  and
  2734.            prints  `Truth  has  no    options.' when completion
  2735.            choices are listed.
  2736.  
  2737.            Note that the man example, and several other exam-
  2738.            ples  below, could just as well have used 'c/*' or
  2739.            'n/*' as 'p/*'.
  2740.  
  2741.            Words can be completed from a  variable    evaluated
  2742.            at completion time,
  2743.  
  2744.            > complete ftp 'p/1/$hostnames/'
  2745.            >     set     hostnames     =    (rtfm.mit.edu
  2746.            tesla.ee.cornell.edu)
  2747.            > ftp [^D]
  2748.            rtfm.mit.edu tesla.ee.cornell.edu
  2749.            > ftp [^C]
  2750.            >    set    hostnames     =     (rtfm.mit.edu
  2751.            tesla.ee.cornell.edu uunet.uu.net)
  2752.            > ftp [^D]
  2753.            rtfm.mit.edu tesla.ee.cornell.edu uunet.uu.net
  2754.  
  2755.            or from a command run at completion time:
  2756.  
  2757.            >  complete    kill  'p/*/`ps    |  awk     \{print\
  2758.            \$1\}`/'
  2759.            > kill -9 [^D]
  2760.            23113 23377 23380 23406 23429 23529 23530 PID
  2761.  
  2762.            Note  that  the    complete  command does not itself
  2763.            quote its arguments, so the braces, space and  `$'
  2764.            in `{print $1}' must be quoted explicitly.
  2765.  
  2766.            One command can have multiple completions:
  2767.  
  2768.  
  2769.  
  2770. Astron 6.07.02         27 October 1996               42
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776. TCSH(1)                           TCSH(1)
  2777.  
  2778.  
  2779.            > complete dbx 'p/2/(core)/' 'p/*/c/'
  2780.  
  2781.            completes  the  second  argument to `dbx' with the
  2782.            word `core' and all other arguments with commands.
  2783.            Note  that  the positional completion is specified
  2784.            before the next-word  completion.   Since  comple-
  2785.            tions  are  evaluated  from  left to right, if the
  2786.            next-word completion were specified first it would
  2787.            always  match  and the positional completion would
  2788.            never be executed. This is a common  mistake  when
  2789.            defining a completion.
  2790.  
  2791.            The  select pattern is useful when a command takes
  2792.            only files with particular forms as arguments. For
  2793.            example,
  2794.  
  2795.            > complete cc 'p/*/f:*.[cao]/'
  2796.  
  2797.            completes  `cc'    arguments only to files ending in
  2798.            `.c', `.a', or  `.o'.   select  can  also  exclude
  2799.            files,    using    negation  of  a  glob-pattern  as
  2800.            described under Filename substitution.  One  might
  2801.            use
  2802.  
  2803.            >              complete               rm
  2804.            'p/*/f:^*.{c,h,cc,C,tex,1,man,l,y}/'
  2805.  
  2806.            to exclude precious source code from `rm'  comple-
  2807.            tion.  Of  course,  one    could still type excluded
  2808.            names manually or override the  completion  mecha-
  2809.            nism  using the complete-word-raw or list-choices-
  2810.            raw editor commands (q.v.).
  2811.  
  2812.            The `C', `D', `F' and `T' lists are like `c', `d',
  2813.            `f'  and `t' respectively, but they use the select
  2814.            argument in a different way: to    restrict  comple-
  2815.            tion  to  files    beginning  with a particular path
  2816.            prefix. For example, the Elm mail program uses `='
  2817.            as  an  abbreviation for one's mail directory. One
  2818.            might use
  2819.  
  2820.            > complete elm c@=@F:$HOME/Mail/@
  2821.  
  2822.            to complete `elm -f ='  as  if  it  were  `elm  -f
  2823.            ~/Mail/'.  Note that we used `@' instead of `/' to
  2824.            avoid confusion with the select argument,  and  we
  2825.            used `$HOME' instead of `~' because home directory
  2826.            substitution only works    at  the  beginning  of    a
  2827.            word.
  2828.  
  2829.            suffix  is  used  to add a nonstandard suffix (not
  2830.            space or `/' for directories) to completed  words.
  2831.  
  2832.            > complete finger 'c/*@/$hostnames/' 'p/1/u/@'
  2833.  
  2834.  
  2835.  
  2836. Astron 6.07.02         27 October 1996               43
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842. TCSH(1)                           TCSH(1)
  2843.  
  2844.  
  2845.            completes arguments to `finger' from the  list  of
  2846.            users,  appends    an  `@', and then completes after
  2847.            the `@' from the `hostnames' variable. Note  again
  2848.            the  order in which the completions are specified.
  2849.  
  2850.            Finally, here's a complex example for inspiration:
  2851.  
  2852.            > complete find \
  2853.            'n/-name/f/' 'n/-newer/f/' 'n/-{,n}cpio/f/' \
  2854.            'n/-exec/c/' 'n/-ok/c/' 'n/-user/u/' \
  2855.            'n/-group/g/' 'n/-fstype/(nfs 4.2)/' \
  2856.            'n/-type/(b c d f l p s)/' \
  2857.            'c/-/(name newer cpio ncpio exec ok user \
  2858.            group fstype type atime ctime depth inum \
  2859.            ls mtime nogroup nouser perm print prune \
  2860.            size xdev)/' \
  2861.            'p/*/d/'
  2862.  
  2863.            This  completes words following `-name', `-newer',
  2864.            `-cpio' or `ncpio' (note the pattern which matches
  2865.            both)  to  files, words following `-exec' or `-ok'
  2866.            to commands, words following `user' and `group' to
  2867.            users  and groups respectively and words following
  2868.            `-fstype' or  `-type'  to  members  of  the  given
  2869.            lists.  It  also completes the switches themselves
  2870.            from the given list (note the use of  c-type  com-
  2871.            pletion) and completes anything not otherwise com-
  2872.            pleted to a directory. Whew.
  2873.  
  2874.            Remember that programmed completions  are  ignored
  2875.            if  the    word being completed is a tilde substitu-
  2876.            tion (beginning with `~') or a variable (beginning
  2877.            with  `$').   complete is an experimental feature,
  2878.            and the syntax may change in  future  versions  of
  2879.            the  shell.   See also the uncomplete builtin com-
  2880.            mand.
  2881.  
  2882.        continue
  2883.            Continues execution of the nearest enclosing while
  2884.            or  foreach.  The rest of the commands on the cur-
  2885.            rent line are executed.
  2886.  
  2887.        default:
  2888.            Labels the default case in a switch statement.  It
  2889.            should come after all case labels.
  2890.  
  2891.        dirs [-l] [-n|-v]
  2892.        dirs -S|-L [filename] (+)
  2893.        dirs -c (+)
  2894.            The first form prints the directory stack. The top
  2895.            of the stack is at the left and the  first  direc-
  2896.            tory  in the stack is the current directory.  With
  2897.            -l, `~' or  `~name'  in    the  output  is  expanded
  2898.            explicitly  to  home  or  the pathname of the home
  2899.  
  2900.  
  2901.  
  2902. Astron 6.07.02         27 October 1996               44
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908. TCSH(1)                           TCSH(1)
  2909.  
  2910.  
  2911.            directory for user name. (+) With -n, entries  are
  2912.            wrapped    before they reach the edge of the screen.
  2913.            (+) With -v, entries are  printed  one  per  line,
  2914.            preceded by their stack postions. (+) If more than
  2915.            one of -n or -v is given, -v takes precedence.  -p
  2916.            is accepted but does nothing.
  2917.  
  2918.            With -S, the second form saves the directory stack
  2919.            to filename as a series of cd and pushd    commands.
  2920.            With -L, the shell sources filename, which is pre-
  2921.            sumably a directory stack file  saved  by  the  -S
  2922.            option or the savedirs mechanism.  In either case,
  2923.            dirsfile is used if  filename  is  not  given  and
  2924.            ~/.cshdirs is used if dirsfile is unset.
  2925.  
  2926.            Note  that login shells do the equivalent of `dirs
  2927.            -L' on startup and, if savedirs is set, `dirs  -S'
  2928.            before  exiting.   Because  only ~/.tcshrc is nor-
  2929.            mally sourced before ~/.cshdirs,  dirsfile  should
  2930.            be set in ~/.tcshrc rather than ~/.login.
  2931.  
  2932.            The last form clears the directory stack.
  2933.  
  2934.        echo [-n] word ...
  2935.            Writes  each  word to the shell's standard output,
  2936.            separated by spaces and terminated with a newline.
  2937.            The  echo_style    shell variable may be set to emu-
  2938.            late (or not) the flags and  escape  sequences  of
  2939.            the  BSD  and/or  System  V  versions of echo; see
  2940.            echo(1).
  2941.  
  2942.        echotc [-sv] arg ... (+)
  2943.            Exercises the  terminal    capabilities  (see  term-
  2944.            cap(5)) in args.  For example, 'echotc home' sends
  2945.            the cursor to the home position, 'echotc cm 3  10'
  2946.            sends it to column 3 and row 10, and 'echotc ts 0;
  2947.            echo "This is a test."; echotc fs' prints "This is
  2948.            a test."  in the status line.
  2949.  
  2950.            If  arg    is  'baud',  'cols',  'lines',    'meta' or
  2951.            'tabs', prints the value of that capability ("yes"
  2952.            or  "no" indicating that the terminal does or does
  2953.            not have that capability). One might use  this  to
  2954.            make  the  output from a shell script less verbose
  2955.            on slow terminals, or limit command output to  the
  2956.            number of lines on the screen:
  2957.  
  2958.            > set history=`echotc lines`
  2959.            > @ history--
  2960.  
  2961.            Termcap    strings  may contain wildcards which will
  2962.            not echo correctly.  One should use double  quotes
  2963.            when  setting a shell variable to a terminal capa-
  2964.            bility string, as in the  following  example  that
  2965.  
  2966.  
  2967.  
  2968. Astron 6.07.02         27 October 1996               45
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974. TCSH(1)                           TCSH(1)
  2975.  
  2976.  
  2977.            places the date in the status line:
  2978.  
  2979.            > set tosl="`echotc ts 0`"
  2980.            > set frsl="`echotc fs`"
  2981.            > echo -n "$tosl";date; echo -n "$frsl"
  2982.  
  2983.            With -s, nonexistent capabilities return the empty
  2984.            string rather than causing  an  error.    With  -v,
  2985.            messages are verbose.
  2986.  
  2987.        else
  2988.        end
  2989.        endif
  2990.        endsw   See  the  description  of the foreach, if, switch,
  2991.            and while statements below.
  2992.  
  2993.        eval arg ...
  2994.            Treats the arguments as input  to  the  shell  and
  2995.            executes  the  resulting command(s) in the context
  2996.            of the current shell. This is usually used to exe-
  2997.            cute  commands  generated as the result of command
  2998.            or variable  substitution,  since  parsing  occurs
  2999.            before  these  substitutions.   See  tset(1) for a
  3000.            sample use of eval.
  3001.  
  3002.        exec command
  3003.            Executes the specified command  in  place  of  the
  3004.            current shell.
  3005.  
  3006.        exit [expr]
  3007.            The shell exits either with the value of the spec-
  3008.            ified expr  (an    expression,  as  described  under
  3009.            Expressions)  or,  without expr, with the value of
  3010.            the status variable.
  3011.  
  3012.        fg [%job ...]
  3013.            Brings the specified jobs (or, without  arguments,
  3014.            the  current  job) into the foreground, continuing
  3015.            each if it is stopped.  job may    be  a  number,    a
  3016.            string,    `',  `%',  `+'    or `-' as described under
  3017.            Jobs.  See also the run-fg-editor editor  command.
  3018.  
  3019.        filetest -op file ... (+)
  3020.            Applies    op  (which  is a file inquiry operator as
  3021.            described under File inquiry  operators)  to  each
  3022.            file  and returns the results as a space-separated
  3023.            list.
  3024.  
  3025.        foreach name (wordlist)
  3026.        ...
  3027.        end     Successively sets the variable name to each member
  3028.            of  wordlist and executes the sequence of commands
  3029.            between this command and the matching end.   (Both
  3030.            foreach    and  end  must    appear    alone on separate
  3031.  
  3032.  
  3033.  
  3034. Astron 6.07.02         27 October 1996               46
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040. TCSH(1)                           TCSH(1)
  3041.  
  3042.  
  3043.            lines.)    The builtin command continue may be  used
  3044.            to  continue  the loop prematurely and the builtin
  3045.            command break to terminate it  prematurely.   When
  3046.            this  command  is read from the terminal, the loop
  3047.            is  read  once  prompting  with    `foreach?  '  (or
  3048.            prompt2)  before  any  statements  in the loop are
  3049.            executed.  If you make a mistake typing in a  loop
  3050.            at the terminal you can rub it out.
  3051.  
  3052.        getspath (+)
  3053.            Prints the system execution path. (TCF only)
  3054.  
  3055.        getxvers (+)
  3056.            Prints the experimental version prefix. (TCF only)
  3057.  
  3058.        glob wordlist
  3059.            Like echo, but no `\' escapes are  recognized  and
  3060.            words are delimited by null characters in the out-
  3061.            put.  Useful for programs which wish  to  use  the
  3062.            shell to filename expand a list of words.
  3063.  
  3064.        goto word
  3065.            word  is filename and command-substituted to yield
  3066.            a string of the form `label'.  The  shell  rewinds
  3067.            its input as much as possible, searches for a line
  3068.            of the form `label:', possibly preceded by  blanks
  3069.            or  tabs, and continues execution after that line.
  3070.  
  3071.        hashstat
  3072.            Prints a statistics line indicating how    effective
  3073.            the  internal hash table has been at locating com-
  3074.            mands (and avoiding exec's). An exec is    attempted
  3075.            for  each  component  of  the  path where the hash
  3076.            function indicates a possible  hit,  and  in  each
  3077.            component which does not begin with a `/'.
  3078.  
  3079.        On  machines  without vfork(2), prints only the number and
  3080.        size of hash buckets.  history [-hTr] [n]
  3081.        history -S|-L|-M [filename] (+)
  3082.        history -c (+)
  3083.            The first form prints the history event list.   If
  3084.            n  is  given  only  the    n  most recent events are
  3085.            printed or saved.  With -h, the    history  list  is
  3086.            printed    without  leading numbers. If -T is speci-
  3087.            fied, timestamps are printed also in comment form.
  3088.            (This  can  be  used to produce files suitable for
  3089.            loading with 'history -L' or 'source  -h'.)   With
  3090.            -r,  the  order    of  printing is most recent first
  3091.            rather than oldest first.
  3092.  
  3093.            With -S, the second form saves the history list to
  3094.            filename.  If the first word of the savehist shell
  3095.            variable is set to a number,  at  most  that  many
  3096.            lines  are  saved.  If the second word of savehist
  3097.  
  3098.  
  3099.  
  3100. Astron 6.07.02         27 October 1996               47
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106. TCSH(1)                           TCSH(1)
  3107.  
  3108.  
  3109.            is set to `merge', the history list is merged with
  3110.            the  existing history file instead of replacing it
  3111.            (if there is one) and sorted by    time  stamp.  (+)
  3112.            Merging    is intended for an environment like the X
  3113.            Window System with several shells in  simultaneous
  3114.            use.   Currently  it only succeeds when the shells
  3115.            quit nicely one after another.
  3116.  
  3117.            With -L, the shell appends filename, which is pre-
  3118.            sumably    a  history list saved by the -S option or
  3119.            the savehist mechanism, to the history  list.   -M
  3120.            is  like  -L,  but  the    contents  of filename are
  3121.            merged into the history list and sorted by  times-
  3122.            tamp.   In  either case, histfile is used if file-
  3123.            name is not given and ~/.history is used if  hist-
  3124.            file  is  unset.   `history  -L'  is  exactly like
  3125.            'source -h' except that    it  does  not  require    a
  3126.            filename.
  3127.  
  3128.            Note  that login shells do the equivalent of `his-
  3129.            tory -L' on startup and, if savehist is set, `his-
  3130.            tory  -S'  before exiting.  Because only ~/.tcshrc
  3131.            is normally sourced  before  ~/.history,  histfile
  3132.            should be set in ~/.tcshrc rather than ~/.login.
  3133.  
  3134.            If  histlit  is    set,  the  first and second forms
  3135.            print and save the literal  (unexpanded)  form  of
  3136.            the history list.
  3137.  
  3138.            The last form clears the history list.
  3139.  
  3140.        hup [command] (+)
  3141.            With  command, runs command such that it will exit
  3142.            on a hangup signal and arranges for the    shell  to
  3143.            send  it  a  hangup  signal  when the shell exits.
  3144.            Note that commands may set their own  response  to
  3145.            hangups,  overriding  hup.   Without  an  argument
  3146.            (allowed only in a shell script), causes the shell
  3147.            to  exit  on  a    hangup    for  the remainder of the
  3148.            script.    See also Signal handling  and  the  nohup
  3149.            builtin command.
  3150.  
  3151.        if (expr) command
  3152.            If expr (an expression, as described under Expres-
  3153.            sions) evaluates true, then command  is    executed.
  3154.            Variable substitution on command happens early, at
  3155.            the same time it does for the rest of the if  com-
  3156.            mand.   command    must  be a simple command, not an
  3157.            alias, a pipeline, a command list or  a    parenthe-
  3158.            sized  command  list,  but  it may have arguments.
  3159.            Input/output redirection occurs even  if  expr  is
  3160.            false  and command is thus not executed; this is a
  3161.            bug.
  3162.  
  3163.  
  3164.  
  3165.  
  3166. Astron 6.07.02         27 October 1996               48
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172. TCSH(1)                           TCSH(1)
  3173.  
  3174.  
  3175.        if (expr) then
  3176.        ...
  3177.        else if (expr2) then
  3178.        ...
  3179.        else
  3180.        ...
  3181.        endif   If the specified expr is true then the commands to
  3182.            the first else are executed; otherwise if expr2 is
  3183.            true then the commands to the second else are exe-
  3184.            cuted,  etc.  Any number of else-if pairs are pos-
  3185.            sible; only one endif is needed.  The else part is
  3186.            likewise optional.  (The words else and endif must
  3187.            appear at the beginning of  input  lines;  the  if
  3188.            must  appear  alone  on its input line or after an
  3189.            else.)
  3190.  
  3191.        inlib shared-library ... (+)
  3192.            Adds each shared-library to the    current  environ-
  3193.            ment.  There is no way to remove a shared library.
  3194.            (Domain/OS only)
  3195.  
  3196.        jobs [-l]
  3197.            Lists the active jobs. With -l, lists process  IDs
  3198.            in addition to the normal information. On TCF sys-
  3199.            tems, prints the site on which each job is execut-
  3200.            ing.
  3201.  
  3202.        kill [-signal] %job|pid ...
  3203.        kill -l The  first form sends the specified signal (or, if
  3204.            none is given, the TERM (terminate) signal) to the
  3205.            specified jobs or processes.  job may be a number,
  3206.            a string, `', `%', `+' or `-' as  described  under
  3207.            Jobs.   Signals    are  either given by number or by
  3208.            name (as given in /usr/include/signal.h,  stripped
  3209.            of  the    prefix    `SIG').  There is no default job;
  3210.            saying just `kill' does not send a signal  to  the
  3211.            current    job.   If  the    signal being sent is TERM
  3212.            (terminate) or HUP (hangup), then the job or  pro-
  3213.            cess  is  sent  a  CONT (continue) signal as well.
  3214.            The second form lists the signal names.
  3215.  
  3216.        limit [-h] [resource [maximum-use]]
  3217.            Limits the consumption by the current process  and
  3218.            each process it creates to not individually exceed
  3219.            maximum-use on the specified resource. If no maxi-
  3220.            mum-use    is  given,  then  the  current    limit  is
  3221.            printed; if no resource is given, then all limita-
  3222.            tions  are  given.   If    the -h flag is given, the
  3223.            hard limits are used instead of the  current  lim-
  3224.            its.  The hard limits impose a ceiling on the val-
  3225.            ues of the current limits.   Only  the  super-user
  3226.            may raise the hard limits, but a user may lower or
  3227.            raise the current limits within the legal range.
  3228.  
  3229.  
  3230.  
  3231.  
  3232. Astron 6.07.02         27 October 1996               49
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238. TCSH(1)                           TCSH(1)
  3239.  
  3240.  
  3241.            Controllable resources currently  include  cputime
  3242.            (the  maximum  number of cpu-seconds to be used by
  3243.            each process), filesize (the largest  single  file
  3244.            which  can  be  created),  datasize  (the  maximum
  3245.            growth of the data+stack region via sbrk(2) beyond
  3246.            the end of the program text), stacksize (the maxi-
  3247.            mum  size  of  the  automatically-extended   stack
  3248.            region),  coredumpsize  (the  size  of the largest
  3249.            core dump that will be  created),  and  memoryuse,
  3250.            the  maximum  amount  of physical memory a process
  3251.            may have allocated to it at a given time.
  3252.  
  3253.            maximum-use may be given as a (floating    point  or
  3254.            integer)  number  followed by a scale factor.  For
  3255.            all limits other than cputime the default scale is
  3256.            `k' or `kilobytes' (1024 bytes); a scale factor of
  3257.            `m' or `megabytes' may also be used.  For  cputime
  3258.            the  default  scaling  is `seconds', while `m' for
  3259.            minutes or `h' for hours, or a time  of    the  form
  3260.            `mm:ss' giving minutes and seconds may be used.
  3261.  
  3262.            For  both  resource names and scale factors, unam-
  3263.            biguous prefixes of the names suffice.
  3264.  
  3265.        log (+) Prints the watch shell  variable  and  reports  on
  3266.            each  user  indicated  in  watch who is logged in,
  3267.            regardless of when they last logged in.    See  also
  3268.            watchlog.
  3269.  
  3270.        login   Terminates  a  login  shell,  replacing it with an
  3271.            instance of /bin/login. This is    one  way  to  log
  3272.            off, included for compatibility with sh(1).
  3273.  
  3274.        logout  Terminates  a  login  shell.  Especially useful if
  3275.            ignoreeof is set.
  3276.  
  3277.        ls-F [-switch ...] [file ...] (+)
  3278.            Lists files like `ls  -F',  but    much  faster.  It
  3279.            identifies  each type of special file in the list-
  3280.            ing with a special character:
  3281.  
  3282.            /   Directory
  3283.            *   Executable
  3284.            #   Block device
  3285.            %   Character device
  3286.            |   Named pipe (systems with named pipes only)
  3287.            =   Socket (systems with sockets only)
  3288.            @   Symbolic link  (systems  with  symbolic  links
  3289.            only)
  3290.            +   Hidden  directory (AIX only) or context depen-
  3291.            dent (HP/UX only)
  3292.            :   Network special (HP/UX only)
  3293.  
  3294.            If the listlinks shell variable is  set,  symbolic
  3295.  
  3296.  
  3297.  
  3298. Astron 6.07.02         27 October 1996               50
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304. TCSH(1)                           TCSH(1)
  3305.  
  3306.  
  3307.            links  are  identified  in  more  detail (only, of
  3308.            course, on systems which have them):
  3309.  
  3310.            @   Symbolic link to a non-directory
  3311.            >   Symbolic link to a directory
  3312.            &   Symbolic link to nowhere
  3313.  
  3314.            listlinks also slows down ls-F and  causes  parti-
  3315.            tions  holding  files pointed to by symbolic links
  3316.            to be mounted.
  3317.  
  3318.            If the listflags shell variable is set to `x', `a'
  3319.            or  `A',  or  any combination thereof (e.g. `xA'),
  3320.            they are used as flags to ls-F, making it act like
  3321.            `ls  -xF',  `ls    -Fa',  `ls  -FA' or a combination
  3322.            (e.g. `ls -FxA').  On machines where  `ls  -C'  is
  3323.            not  the  default, ls-F acts like `ls -CF', unless
  3324.            listflags contains an `x', in which case  it  acts
  3325.            like `ls -xF'.  ls-F passes its arguments to ls(1)
  3326.            if it is given any switches, so    `alias    ls  ls-F'
  3327.            generally does the right thing.
  3328.  
  3329.        migrate [-site] pid|%jobid ... (+)
  3330.        migrate -site (+)
  3331.            The  first form migrates the process or job to the
  3332.            site specified or the default site  determined  by
  3333.            the system path.  The second form is equivalent to
  3334.            `migrate -site $$': it migrates the  current  pro-
  3335.            cess  to  the  specified site. Migrating the shell
  3336.            itself can cause unexpected  behavior,  since  the
  3337.            shell does not like to lose its tty. (TCF only)
  3338.  
  3339.        newgrp [-] group (+)
  3340.            Equivalent   to     `exec    newgrp';  see  newgrp(1).
  3341.            Available only if the shell was so  compiled;  see
  3342.            the version shell variable.
  3343.  
  3344.        nice [+number] [command]
  3345.            Sets the scheduling priority for the shell to num-
  3346.            ber, or, without number, to 4. With command,  runs
  3347.            command    at the appropriate priority.  The greater
  3348.            the number, the less cpu the  process  gets.   The
  3349.            super-user  may specify negative priority by using
  3350.            `nice -number ...'.  Command is always executed in
  3351.            a  sub-shell,  and the restrictions placed on com-
  3352.            mands in simple if statements apply.
  3353.  
  3354.        nohup [command]
  3355.            With command,  runs  command  such  that  it  will
  3356.            ignore hangup signals.  Note that commands may set
  3357.            their own response to hangups,  overriding  nohup.
  3358.            Without    an  argument  (allowed    only  in  a shell
  3359.            script), causes the shell to  ignore  hangups  for
  3360.            the  remainder  of  the    script.   See also Signal
  3361.  
  3362.  
  3363.  
  3364. Astron 6.07.02         27 October 1996               51
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370. TCSH(1)                           TCSH(1)
  3371.  
  3372.  
  3373.            handling and the hup builtin command.
  3374.  
  3375.        notify [%job ...]
  3376.            Causes the shell to notify the user asynchronously
  3377.            when  the status of any of the specified jobs (or,
  3378.            without %job, the current job) changes, instead of
  3379.            waiting    until  the  next prompt as is usual.  job
  3380.            may be a number, a string, `', `%', `+' or `-'  as
  3381.            described  under  Jobs.    See also the notify shell
  3382.            variable.
  3383.  
  3384.        onintr [-|label]
  3385.            Controls the action of the  shell  on  interrupts.
  3386.            Without    arguments, restores the default action of
  3387.            the shell on interrupts,  which    is  to    terminate
  3388.            shell scripts or to return to the terminal command
  3389.            input level.  With `-', causes all  interrupts  to
  3390.            be  ignored.  With label, causes the shell to exe-
  3391.            cute a `goto label' when an interrupt is  received
  3392.            or  a  child  process  terminates  because  it was
  3393.            interrupted.
  3394.  
  3395.            onintr is ignored if the shell is running detached
  3396.            and  in    system    startup  files (see FILES), where
  3397.            interrupts are disabled anyway.
  3398.  
  3399.        popd [-p] [-l] [-n|-v] [+n]
  3400.            Without arguments, pops the  directory  stack  and
  3401.            returns    to  the new top directory.  With a number
  3402.            `+n', discards the n'th entry in the stack.
  3403.  
  3404.            Finally, all forms of popd print the final  direc-
  3405.            tory  stack, just like dirs. The pushdsilent shell
  3406.            variable can be set to prevent  this  and  the  -p
  3407.            flag  can  be  given to override pushdsilent.  The
  3408.            -l, -n and -v flags have the same effect  on  popd
  3409.            as on dirs. (+)
  3410.  
  3411.        printenv [name] (+)
  3412.            Prints  the  names  and    values of all environment
  3413.            variables or, with name, the value of the environ-
  3414.            ment variable name.
  3415.  
  3416.        pushd [-p] [-l] [-n|-v] [name|+n]
  3417.            Without    arguments, exchanges the top two elements
  3418.            of the directory stack.    If  pushdtohome  is  set,
  3419.            pushd  without  arguments does `pushd ~', like cd.
  3420.            (+) With name, pushes the current  working  direc-
  3421.            tory onto the directory stack and changes to name.
  3422.            If name is `-' it is interpreted as  the  previous
  3423.            working directory (see Filename substitution). (+)
  3424.            If dunique is set, pushd removes any instances  of
  3425.            name  from  the    stack  before pushing it onto the
  3426.            stack. (+) With a number  `+n',    rotates  the  nth
  3427.  
  3428.  
  3429.  
  3430. Astron 6.07.02         27 October 1996               52
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436. TCSH(1)                           TCSH(1)
  3437.  
  3438.  
  3439.            element    of  the  directory stack around to be the
  3440.            top element and changes to  it.     If  dextract  is
  3441.            set,  however,  `pushd +n' extracts the nth direc-
  3442.            tory, pushes it onto the  top  of  the  stack  and
  3443.            changes to it. (+)
  3444.  
  3445.            Finally, all forms of pushd print the final direc-
  3446.            tory stack, just like dirs. The pushdsilent  shell
  3447.            variable  can  be  set  to prevent this and the -p
  3448.            flag can be given to  override  pushdsilent.   The
  3449.            -l,  -n and -v flags have the same effect on pushd
  3450.            as on dirs. (+)
  3451.  
  3452.        rehash  Causes the internal hash table of the contents  of
  3453.            the  directories in the path variable to be recom-
  3454.            puted.  This is needed if new commands  are  added
  3455.            to  directories    in  path while you are logged in.
  3456.            This should only be necessary if you add  commands
  3457.            to  one    of  your own directories, or if a systems
  3458.            programmer changes the contents of one of the sys-
  3459.            tem  directories.  Also    flushes the cache of home
  3460.            directories built by tilde expansion.
  3461.  
  3462.        repeat count command
  3463.            The specified command, which  is  subject  to  the
  3464.            same  restrictions  as the command in the one line
  3465.            if statement above, is executed count times.   I/O
  3466.            redirections  occur exactly once, even if count is
  3467.            0.
  3468.  
  3469.        rootnode //nodename (+)
  3470.            Changes the rootnode to //nodename,  so    that  `/'
  3471.            will  be  interpreted  as `//nodename'. (Domain/OS
  3472.            only)
  3473.  
  3474.        sched (+)
  3475.        sched [+]hh:mm command (+)
  3476.        sched -n (+)
  3477.            The first form prints  the  scheduled-event  list.
  3478.            The  sched shell variable may be set to define the
  3479.            format  in  which  the  scheduled-event    list   is
  3480.            printed.   The  second  form  adds  command to the
  3481.            scheduled-event list.  For example,
  3482.  
  3483.            > sched 11:00 echo It\'s eleven o\'clock.
  3484.  
  3485.            causes the shell to echo `It's eleven o'clock.' at
  3486.            11 AM.  The time may be in 12-hour AM/PM format
  3487.  
  3488.            > sched 5pm set prompt='[%h] It\'s after 5; go
  3489.            home: >'
  3490.  
  3491.            or may be relative to the current time:
  3492.  
  3493.  
  3494.  
  3495.  
  3496. Astron 6.07.02         27 October 1996               53
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502. TCSH(1)                           TCSH(1)
  3503.  
  3504.  
  3505.            > sched +2:15 /usr/lib/uucp/uucico -r1 -sother
  3506.  
  3507.            A  relative  time  specification may not use AM/PM
  3508.            format.    The third form removes item  n    from  the
  3509.            event list:
  3510.  
  3511.            > sched
  3512.             1  Wed Apr  4 15:42  /usr/lib/uucp/uucico
  3513.            -r1 -sother
  3514.             2  Wed Apr  4 17:00  set prompt=[%h] It's
  3515.            after 5; go home: >
  3516.            > sched -2
  3517.            > sched
  3518.             1  Wed Apr  4 15:42  /usr/lib/uucp/uucico
  3519.            -r1 -sother
  3520.  
  3521.            A command in the scheduled-event list is  executed
  3522.            just  before the first prompt is printed after the
  3523.            time when the command is scheduled.  It is  possi-
  3524.            ble  to miss the exact time when the command is to
  3525.            be run, but an overdue command will execute at the
  3526.            next  prompt.  A command which comes due while the
  3527.            shell is waiting for user input is executed  imme-
  3528.            diately.  However, normal operation of an already-
  3529.            running command will not be interrupted so that    a
  3530.            scheduled-event list element may be run.
  3531.  
  3532.            This mechanism is similar to, but not the same as,
  3533.            the at(1) command on some Unix systems.    Its major
  3534.            disadvantage  is  that it may not run a command at
  3535.            exactly the specified time.  Its  major    advantage
  3536.            is  that  because  sched  runs  directly  from the
  3537.            shell, it has access to shell variables and  other
  3538.            structures.   This provides a mechanism for chang-
  3539.            ing one's working environment based on the time of
  3540.            day.
  3541.  
  3542.        set
  3543.        set name ...
  3544.        set name=word ...
  3545.        set name=(wordlist) ...
  3546.        set name[index]=word ...
  3547.        set -r (+)
  3548.        set -r name ... (+)
  3549.        set -r name=word ... (+)
  3550.        set -r name=(wordlist) ... (+)
  3551.            The  first form of the command prints the value of
  3552.            all shell variables.  Variables which contain more
  3553.            than  a    single word print as a parenthesized word
  3554.            list.  The second  form    sets  name  to    the  null
  3555.            string.     The  third  form sets name to the single
  3556.            word.  The fourth form sets name to  the  list  of
  3557.            words  in wordlist. In all cases the value is com-
  3558.            mand and filename expanded.  The fifth  form  sets
  3559.  
  3560.  
  3561.  
  3562. Astron 6.07.02         27 October 1996               54
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568. TCSH(1)                           TCSH(1)
  3569.  
  3570.  
  3571.            the  index'th component of name to word; this com-
  3572.            ponent must already exist.  The sixth  form  lists
  3573.            the  names (only) of all shell variables which are
  3574.            read-only.  The seventh form makes name read-only,
  3575.            whether    or  not  it has a value.  The second form
  3576.            sets name to the  null  string.     The  eighth  and
  3577.            ninth  forms  are the same as the third and fourth
  3578.            forms, but make name read-only at the same time.
  3579.  
  3580.            These arguments can be repeated to set and/or make
  3581.            read-only  multiple variables in a single set com-
  3582.            mand.  Note, however, that variable expansion hap-
  3583.            pens  for all arguments before any setting occurs.
  3584.            Note also that `=' can be adjacent  to  both  name
  3585.            and word or separated from both by whitespace, but
  3586.            cannot be adjacent to only one or the other.   See
  3587.            also the unset builtin command.
  3588.  
  3589.        setenv [name [value]]
  3590.            Without    arguments, prints the names and values of
  3591.            all environment variables.  Given name,    sets  the
  3592.            environment  variable  name  to    value or, without
  3593.            value, to the null string.
  3594.  
  3595.        setpath path (+)
  3596.            Equivalent to setpath(1). (Mach only)
  3597.  
  3598.        setspath LOCAL|site|cpu ... (+)
  3599.            Sets the system execution path. (TCF only)
  3600.  
  3601.        settc cap value (+)
  3602.            Tells the shell to believe that the terminal capa-
  3603.            bility  cap  (as  defined  in  termcap(5)) has the
  3604.            value value.  No sanity checking is done.  Concept
  3605.            terminal  users    may  have to `settc xn no' to get
  3606.            proper wrapping at the rightmost column.
  3607.  
  3608.        setty [-d|-q|-x] [-a] [[+|-]mode] (+)
  3609.            Controls which tty modes (see Terminal management)
  3610.            the  shell does not allow to change.  -d, -q or -x
  3611.            tells setty to act on the `edit', `quote' or `exe-
  3612.            cute'  set  of tty modes respectively; without -d,
  3613.            -q or -x, `execute' is used.
  3614.  
  3615.            Without other arguments, setty lists the modes  in
  3616.            the chosen set which are fixed on (`+mode') or off
  3617.            (`-mode').  The available modes, and thus the dis-
  3618.            play,  vary from system to system.  With -a, lists
  3619.            all tty modes in the chosen  set  whether  or  not
  3620.            they  are fixed.  With +mode, -mode or mode, fixes
  3621.            mode on or off or removes control from mode in the
  3622.            chosen  set.   For  example,  `setty +echok echoe'
  3623.            fixes `echok' mode on and allows commands to  turn
  3624.            `echoe'    mode  on  or  off, both when the shell is
  3625.  
  3626.  
  3627.  
  3628. Astron 6.07.02         27 October 1996               55
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634. TCSH(1)                           TCSH(1)
  3635.  
  3636.  
  3637.            executing commands.
  3638.  
  3639.        setxvers [string] (+)
  3640.            Set the experimental version prefix to string,  or
  3641.            removes it if string is omitted. (TCF only)
  3642.  
  3643.        shift [variable]
  3644.            Without arguments, discards argv[1] and shifts the
  3645.            members of argv to the left. It is  an  error  for
  3646.            argv  not  to be set or to have less than one word
  3647.            as value. With variable, performs the  same  func-
  3648.            tion on variable.
  3649.  
  3650.        source [-h] name [args ...]
  3651.            The  shell  reads and executes commands from name.
  3652.            The commands are not placed on the  history  list.
  3653.            If  any    args  are given, they are placed in argv.
  3654.            (+) source commands may be  nested;  if    they  are
  3655.            nested  too  deeply  the shell may run out of file
  3656.            descriptors.  An error in a source  at  any  level
  3657.            terminates  all    nested source commands.  With -h,
  3658.            commands are placed on the history list instead of
  3659.            being executed, much like `history -L'.
  3660.  
  3661.        stop %job|pid ...
  3662.            Stops  the  specified  jobs or processes which are
  3663.            executing in the background.  job may be a number,
  3664.            a  string,  `', `%', `+' or `-' as described under
  3665.            Jobs.  There is no default job; saying just `stop'
  3666.            does not stop the current job.
  3667.  
  3668.        suspend Causes the shell to stop in its tracks, much as if
  3669.            it had been sent a stop signal with  ^Z.  This  is
  3670.            most often used to stop shells started by su(1).
  3671.  
  3672.        switch (string)
  3673.        case str1:
  3674.        ...
  3675.        breaksw
  3676.        ...
  3677.        default:
  3678.        ...
  3679.        breaksw
  3680.        endsw   Each  case  label is successively matched, against
  3681.            the specified string which is  first  command  and
  3682.            filename  expanded.   The file metacharacters `*',
  3683.            `?' and `[...]'    may be used in the  case  labels,
  3684.            which  are  variable  expanded.     If  none  of the
  3685.            labels match before a `default'    label  is  found,
  3686.            then the execution begins after the default label.
  3687.            Each case label and the default label must  appear
  3688.            at  the    beginning of a line.  The command breaksw
  3689.            causes execution to continue after the endsw. Oth-
  3690.            erwise  control    may  fall through case labels and
  3691.  
  3692.  
  3693.  
  3694. Astron 6.07.02         27 October 1996               56
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700. TCSH(1)                           TCSH(1)
  3701.  
  3702.  
  3703.            default labels as in C.    If no label  matches  and
  3704.            there is no default, execution continues after the
  3705.            endsw.
  3706.  
  3707.        telltc (+)
  3708.            Lists the values of all terminal capabilities (see
  3709.            termcap(5)).
  3710.  
  3711.        time [command]
  3712.            Executes  command (which must be a simple command,
  3713.            not an alias, a pipeline,  a  command  list  or    a
  3714.            parenthesized command list) and prints a time sum-
  3715.            mary as described under    the  time  variable.   If
  3716.            necessary,  an extra shell is created to print the
  3717.            time statistic when the command completes.   With-
  3718.            out command, prints a time summary for the current
  3719.            shell and its children.
  3720.  
  3721.        umask [value]
  3722.            Sets the file creation mask  to    value,    which  is
  3723.            given  in  octal.   Common values for the mask are
  3724.            002, giving all access to the group and    read  and
  3725.            execute access to others, and 022, giving read and
  3726.            execute access to the group and    others.   Without
  3727.            value, prints the current file creation mask.
  3728.  
  3729.        unalias pattern
  3730.            Removes    all  aliases  whose  names match pattern.
  3731.            `unalias *' thus removes all aliases.  It  is  not
  3732.            an error for nothing to be unaliased.
  3733.  
  3734.        uncomplete pattern (+)
  3735.            Removes all completions whose names match pattern.
  3736.            `uncomplete *' thus removes all    completions.   It
  3737.            is not an error for nothing to be uncompleted.
  3738.  
  3739.        unhash  Disables  use  of the internal hash table to speed
  3740.            location of executed programs.
  3741.  
  3742.        universe universe (+)
  3743.            Sets the universe to universe. (Masscomp/RTU only)
  3744.  
  3745.        unlimit [-h] [resource]
  3746.            Removes    the  limitation  on  resource  or,  if no
  3747.            resource is specified, all  resource  limitations.
  3748.            With   -h,   the  corresponding    hard  limits  are
  3749.            removed.  Only the super-user may do this.
  3750.  
  3751.        unset pattern
  3752.            Removes all variables whose names  match  pattern,
  3753.            unless they are read-only.  `unset *' thus removes
  3754.            all variables unless they are read-only; this is a
  3755.            bad  idea.   It    is not an error for nothing to be
  3756.            unset.
  3757.  
  3758.  
  3759.  
  3760. Astron 6.07.02         27 October 1996               57
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766. TCSH(1)                           TCSH(1)
  3767.  
  3768.  
  3769.        unsetenv pattern
  3770.            Removes    all  environment  variables  whose  names
  3771.            match  pattern.     `unsetenv  *'    thus  removes all
  3772.            environment variables; this is a bad idea.  It  is
  3773.            not an error for nothing to be unsetenved.
  3774.  
  3775.        ver [systype [command]] (+)
  3776.            Without    arguments,  prints SYSTYPE. With systype,
  3777.            sets SYSTYPE to systype. With systype and command,
  3778.            executes  command  under  systype.  systype may be
  3779.            `bsd4.3' or `sys5.3'.  (Domain/OS only)
  3780.  
  3781.        wait    The shell waits for all background jobs.   If  the
  3782.            shell  is  interactive,    an interrupt will disrupt
  3783.            the wait and cause the shell to    print  the  names
  3784.            and job numbers of all outstanding jobs.
  3785.  
  3786.        warp universe (+)
  3787.            Sets the universe to universe. (Convex/OS only)
  3788.  
  3789.        watchlog (+)
  3790.            An  alternate  name  for  the  log builtin command
  3791.            (q.v.).    Available only if the shell was  so  com-
  3792.            piled; see the version shell variable.
  3793.  
  3794.        where command (+)
  3795.            Reports    all known instances of command, including
  3796.            aliases, builtins and executables in path.
  3797.  
  3798.        which command (+)
  3799.            Displays the command that will be executed by  the
  3800.            shell  after  substitutions,  path searching, etc.
  3801.            The builtin command is just like which(1), but  it
  3802.            correctly reports tcsh aliases and builtins and is
  3803.            10 to 100  times  faster.   See    also  the  which-
  3804.            command editor command.
  3805.  
  3806.        while (expr)
  3807.        ...
  3808.        end     Executes  the  commands    between the while and the
  3809.            matching  end  while  expr  (an     expression,   as
  3810.            described  under  Expressions) evaluates non-zero.
  3811.            while and end must appear  alone  on  their  input
  3812.            lines.    break  and continue may be used to termi-
  3813.            nate or continue the  loop  prematurely.   If  the
  3814.            input  is  a  terminal,    the  user is prompted the
  3815.            first time through the loop as with foreach.
  3816.  
  3817.    Special aliases (+)
  3818.        If set, each of these aliases  executes    automatically  at
  3819.        the indicated time.  They are all initially undefined.
  3820.  
  3821.        beepcmd Runs  when  the    shell  wants to ring the terminal
  3822.            bell.
  3823.  
  3824.  
  3825.  
  3826. Astron 6.07.02         27 October 1996               58
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832. TCSH(1)                           TCSH(1)
  3833.  
  3834.  
  3835.        cwdcmd  Runs after every change of working directory.  For
  3836.            example,  if  the  user    is working on an X window
  3837.            system using xterm(1) and  a  re-parenting  window
  3838.            manager    that  supports    title bars such as twm(1)
  3839.            and does
  3840.  
  3841.            > alias cwdcmd   'echo  -n  "^[]2;${HOST}:$cwd
  3842.            ^G"'
  3843.  
  3844.            then  the  shell will change the title of the run-
  3845.            ning xterm(1) to be the name of the host, a colon,
  3846.            and the full current working directory.    A fancier
  3847.            way to do that is
  3848.  
  3849.            >      alias       cwdcmd       'echo       -n
  3850.            "^[]2;${HOST}:$cwd^G^[]1;${HOST}^G"'
  3851.  
  3852.            This  will  put the hostname and working directory
  3853.            on the title bar but only the hostname in the icon
  3854.            manager menu.
  3855.  
  3856.            Note  that  putting  a cd, pushd or popd in cwdcmd
  3857.            may cause an infinite loop.  It    is  the  author's
  3858.            opinion    that  anyone  doing so will get what they
  3859.            deserve.
  3860.  
  3861.        periodic
  3862.            Runs every tperiod minutes. This provides a conve-
  3863.            nient  means for checking on common but infrequent
  3864.            changes such as new mail. For example, if one does
  3865.  
  3866.            > set tperiod = 30
  3867.            > alias periodic checknews
  3868.  
  3869.            then  the  checknews(1) program runs every 30 min-
  3870.            utes.  If periodic is set but tperiod is unset  or
  3871.            set to 0, periodic behaves like precmd.
  3872.  
  3873.        precmd  Runs just before each prompt is printed. For exam-
  3874.            ple, if one does
  3875.  
  3876.            > alias precmd date
  3877.  
  3878.            then date(1) runs just before  the  shell  prompts
  3879.            for  each  command.   There  are no limits on what
  3880.            precmd can be set to do, but discretion should  be
  3881.            used.
  3882.  
  3883.        shell   Specifies  the  interpreter for executable scripts
  3884.            which do not themselves    specify  an  interpreter.
  3885.            The  first  word should be a full path name to the
  3886.            desired     interpreter    (e.g.     `/bin/csh'    or
  3887.            `/usr/local/bin/tcsh').
  3888.  
  3889.  
  3890.  
  3891.  
  3892. Astron 6.07.02         27 October 1996               59
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898. TCSH(1)                           TCSH(1)
  3899.  
  3900.  
  3901.    Special shell variables
  3902.        The variables described in this section have special mean-
  3903.        ing to the shell.
  3904.  
  3905.        The  shell  sets  addsuffix,  argv,  autologout,  command,
  3906.        echo_style,  edit,  gid,  group, home, loginsh, oid, path,
  3907.        prompt, prompt2, prompt3, shell, shlvl, tcsh,  term,  tty,
  3908.        uid,  user  and    version  at  startup;  they do not change
  3909.        thereafter unless changed by the user. The  shell  updates
  3910.        cwd,  dirstack,    owd  and  status when necessary, and sets
  3911.        logout on logout.
  3912.  
  3913.        The shell synchronizes afsuser, group, home, path,  shlvl,
  3914.        term  and  user with the environment variables of the same
  3915.        names: whenever the environment variable changes the shell
  3916.        changes    the corresponding shell variable to match (unless
  3917.        the shell variable is read-only) and vice versa. Note that
  3918.        although cwd and PWD have identical meanings, they are not
  3919.        synchronized in this manner, and that the shell    automati-
  3920.        cally  interconverts  the  different  formats  of path and
  3921.        PATH.
  3922.  
  3923.        addsuffix (+)
  3924.            If set, filename completion adds `/' to the end of
  3925.            directories and a space to the end of normal files
  3926.            when they are matched exactly.  Set by default.
  3927.  
  3928.        afsuser (+)
  3929.            If set, autologout's  autolock  feature    uses  its
  3930.            value  instead  of the local username for kerberos
  3931.            authentication.
  3932.  
  3933.        ampm (+)
  3934.            If set, all times are shown in 12-hour AM/PM  for-
  3935.            mat.
  3936.  
  3937.        argv    The  arguments to the shell. Positional parameters
  3938.            are taken from argv,  i.e.  `$1'  is  replaced  by
  3939.            `$argv[1]',  etc.   Set    by  default,  but usually
  3940.            empty in interactive shells.
  3941.  
  3942.        autocorrect (+)
  3943.            If set, the spell-word editor command  is  invoked
  3944.            automatically before each completion attempt.
  3945.  
  3946.        autoexpand (+)
  3947.            If  set,  the  expand-history  editor  command  is
  3948.            invoked    automatically  before    each   completion
  3949.            attempt.
  3950.  
  3951.        autolist (+)
  3952.            If  set, possibilities are listed after an ambigu-
  3953.            ous completion.    If set to `ambiguous', possibili-
  3954.            ties  are  listed  only when no new characters are
  3955.  
  3956.  
  3957.  
  3958. Astron 6.07.02         27 October 1996               60
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964. TCSH(1)                           TCSH(1)
  3965.  
  3966.  
  3967.            added by completion.
  3968.  
  3969.        autologout (+)
  3970.            The first word is the number of minutes    of  inac-
  3971.            tivity  before automatic logout. The optional sec-
  3972.            ond word is the number of  minutes  of  inactivity
  3973.            before automatic locking.  When the shell automat-
  3974.            ically logs out, it prints `auto-logout', sets the
  3975.            variable  logout  to  `automatic' and exits.  When
  3976.            the  shell  automatically  locks,  the    user   is
  3977.            required  to  enter his password to continue work-
  3978.            ing. Five incorrect attempts result  in    automatic
  3979.            logout.     Set  to  `60' (automatic logout after 60
  3980.            minutes, and no locking) by default in  login  and
  3981.            superuser  shells,  but not if the shell thinks it
  3982.            is running under a window system (i.e. the DISPLAY
  3983.            environment variable is set), the tty is a pseudo-
  3984.            tty (pty) or the shell was not  so  compiled  (see
  3985.            the version shell variable).  See also the afsuser
  3986.            and logout shell variables.
  3987.  
  3988.        backslash_quote (+)
  3989.            If set, backslashes (`\') always quote  `\',  `'',
  3990.            and  `"'. This may make complex quoting tasks eas-
  3991.            ier, but it can    cause  syntax  errors  in  csh(1)
  3992.            scripts.
  3993.  
  3994.        cdpath  A  list    of  directories in which cd should search
  3995.            for subdirectories if they  aren't  found  in  the
  3996.            current directory.
  3997.  
  3998.        command (+)
  3999.            If  set, the command which was passed to the shell
  4000.            with the -c flag (q.v.).
  4001.  
  4002.        complete (+)
  4003.            If set to `enhance', completion    1)  ignores  case
  4004.            and  2) considers periods, hyphens and underscores
  4005.            (`.', `-' and  `_')  to    be  word  separators  and
  4006.            hyphens and underscores to be equivalent.
  4007.  
  4008.        correct (+)
  4009.            If   set  to  `cmd',  commands  are  automatically
  4010.            spelling-corrected.  If set  to    `complete',  com-
  4011.            mands  are  automatically  completed.   If  set to
  4012.            `all', the entire command line is corrected.
  4013.  
  4014.        cwd     The full pathname of the current  directory.   See
  4015.            also the dirstack and owd shell variables.
  4016.  
  4017.        dextract (+)
  4018.            If set, `pushd +n' extracts the nth directory from
  4019.            the directory stack rather than rotating it to the
  4020.            top.
  4021.  
  4022.  
  4023.  
  4024. Astron 6.07.02         27 October 1996               61
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030. TCSH(1)                           TCSH(1)
  4031.  
  4032.  
  4033.        dirsfile (+)
  4034.            The  default location in which `dirs -S' and `dirs
  4035.            -L' look for a history file. If unset,  ~/.cshdirs
  4036.            is  used.   Because  only  ~/.tcshrc  is  normally
  4037.            sourced before ~/.cshdirs, dirsfile should be  set
  4038.            in ~/.tcshrc rather than ~/.login.
  4039.  
  4040.        dirstack (+)
  4041.            An  array  of all the directories on the directory
  4042.            stack.    `$dirstack[1]'    is  the  current  working
  4043.            directory,  `$dirstack[2]'  the first directory on
  4044.            the stack, etc.    Note  that  the  current  working
  4045.            directory  is `$dirstack[1]' but `=0' in directory
  4046.            stack substitutions,  etc.   One  can  change  the
  4047.            stack  arbitrarily  by  setting    dirstack, but the
  4048.            first element (the current working  directory)  is
  4049.            always  correct.   See  also the cwd and owd shell
  4050.            variables.
  4051.  
  4052.        dunique (+)
  4053.            If set, pushd removes any instances of  name  from
  4054.            the stack before pushing it onto the stack.
  4055.  
  4056.        echo    If  set, each command with its arguments is echoed
  4057.            just before it is executed.  For non-builtin  com-
  4058.            mands   all   expansions   occur  before  echoing.
  4059.            Builtin commands are  echoed  before  command  and
  4060.            filename  substitution,    since these substitutions
  4061.            are then done selectively.  Set by the -x  command
  4062.            line option.
  4063.  
  4064.        echo_style (+)
  4065.            The style of the echo builtin. May be set to
  4066.  
  4067.            bsd     Don't echo a newline if the first argument
  4068.                is `-n'.
  4069.            sysv    Recognize backslashed escape sequences  in
  4070.                echo strings.
  4071.            both    Recognize  both    the  `-n'  flag and back-
  4072.                slashed escape sequences; the default.
  4073.            none    Recognize neither.
  4074.  
  4075.            Set by default to the local  system  default.  The
  4076.            BSD  and  System  V  options  are described in the
  4077.            echo(1) manpages on the appropriate systems.
  4078.  
  4079.        edit (+)
  4080.            If set, the command-line editor is used.   Set  by
  4081.            default in interactive shells.
  4082.  
  4083.        ellipsis (+)
  4084.            If  set,  the  `%c'/`%.' and `%C' prompt sequences
  4085.            (see the prompt shell variable)    indicate  skipped
  4086.            directories  with  an ellipsis (`...')  instead of
  4087.  
  4088.  
  4089.  
  4090. Astron 6.07.02         27 October 1996               62
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096. TCSH(1)                           TCSH(1)
  4097.  
  4098.  
  4099.            `/<skipped>'.
  4100.  
  4101.        fignore (+)
  4102.            Lists file name suffixes to be ignored by  comple-
  4103.            tion.
  4104.  
  4105.        filec   In  tcsh, completion is always used and this vari-
  4106.            able is ignored.  If set in csh, filename  comple-
  4107.            tion is used.
  4108.  
  4109.        gid (+) The user's real group ID.
  4110.  
  4111.        group (+)
  4112.            The user's group name.
  4113.  
  4114.        histchars
  4115.            A  string value determining the characters used in
  4116.            History substitution (q.v.).  The first    character
  4117.            of  its    value is used as the history substitution
  4118.            character, replacing the  default  character  `!'.
  4119.            The  second  character  of  its value replaces the
  4120.            character `^' in quick substitutions.
  4121.  
  4122.        histdup (+)
  4123.            Controls handling of duplicate entries in the his-
  4124.            tory  list.   If  set to `all' only unique history
  4125.            events are entered in the history list. If set  to
  4126.            `prev'  and  the last history event is the same as
  4127.            the current command, then the current  command  is
  4128.            not entered in the history.  If set to `erase' and
  4129.            the same event is found in the history list,  that
  4130.            old  event  gets  erased  and the current one gets
  4131.            inserted. Note that the `prev' and  `all'  options
  4132.            renumber history events so there are no gaps.
  4133.  
  4134.        histfile (+)
  4135.            The  default  location  in  which `history -S' and
  4136.            `history -L' look for a history    file.  If  unset,
  4137.            ~/.history is used.  histfile is useful when shar-
  4138.            ing the    same  home  directory  between    different
  4139.            machines,  or  when  saving  separate histories on
  4140.            different terminals.  Because  only  ~/.tcshrc  is
  4141.            normally   sourced   before  ~/.history,  histfile
  4142.            should be set in ~/.tcshrc rather than ~/.login.
  4143.  
  4144.        histlit (+)
  4145.            If set, builtin and editor commands and the  save-
  4146.            hist  mechanism    use the literal (unexpanded) form
  4147.            of lines in the history list.  See also    the  tog-
  4148.            gle-literal-history editor command.
  4149.  
  4150.        history The  first  word  indicates  the number of history
  4151.            events to save.     The  optional    second    word  (+)
  4152.            indicates  the format in which history is printed;
  4153.  
  4154.  
  4155.  
  4156. Astron 6.07.02         27 October 1996               63
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162. TCSH(1)                           TCSH(1)
  4163.  
  4164.  
  4165.            if not given, `%h\t%T\t%R\n' is used.  The  format
  4166.            sequences  are  described below under prompt; note
  4167.            the variable meaning of `%R'.   Set  to    `100'  by
  4168.            default.
  4169.  
  4170.        home    Initialized  to the home directory of the invoker.
  4171.            The filename expansion of `~' refers to this vari-
  4172.            able.
  4173.  
  4174.        ignoreeof
  4175.            If  set    to  the empty string or `0' and the input
  4176.            device is  a  terminal,    the  end-of-file  command
  4177.            (usually  generated  by the user by typing `^D' on
  4178.            an empty line) causes  the  shell  to  print  `Use
  4179.            "exit"  to  leave tcsh.' instead of exiting.  This
  4180.            prevents the shell from accidentally being killed.
  4181.            If set to a number n, the shell ignores n - 1 con-
  4182.            secutive end-of-files and exits on the nth. (+) If
  4183.            unset, `1' is used, i.e. the shell exits on a sin-
  4184.            gle `^D'.
  4185.  
  4186.        implicitcd (+)
  4187.            If set, the shell treats a directory name typed as
  4188.            a command as though it were a request to change to
  4189.            that directory. If set to verbose, the  change  of
  4190.            directory  is  echoed to the standard output. This
  4191.            behavior is  inhibited  in  non-interactive  shell
  4192.            scripts, or for command strings with more than one
  4193.            word. Changing  directory  takes  precedence  over
  4194.            executing  a  like-named  command,  but it is done
  4195.            after  alias  substitutions.  Tilde  and  variable
  4196.            expansions work as expected.
  4197.  
  4198.        inputmode (+)
  4199.            If set to `insert' or `overwrite', puts the editor
  4200.            into that input mode  at  the  beginning  of  each
  4201.            line.
  4202.  
  4203.        listflags (+)
  4204.            If  set    to  `x',  `a'  or `A', or any combination
  4205.            thereof (e.g. `xA'), they are  used  as    flags  to
  4206.            ls-F,  making  it act like `ls -xF', `ls -Fa', `ls
  4207.            -FA' or a combination (e.g. `ls -FxA'): `a'  shows
  4208.            all  files  (even  if  they start with a `.'), `A'
  4209.            shows all files but `.' and `..',  and  `x'  sorts
  4210.            across  instead    of  down.   If the second word of
  4211.            listflags is set,  it  is  used    as  the  path  to
  4212.            `ls(1)'.
  4213.  
  4214.        listjobs (+)
  4215.            If  set,  all  jobs  are listed when a job is sus-
  4216.            pended. If set to `long', the listing is  in  long
  4217.            format.
  4218.  
  4219.  
  4220.  
  4221.  
  4222. Astron 6.07.02         27 October 1996               64
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228. TCSH(1)                           TCSH(1)
  4229.  
  4230.  
  4231.        listlinks (+)
  4232.            If set, the ls-F builtin command shows the type of
  4233.            file to which each symbolic link points.
  4234.  
  4235.        listmax (+)
  4236.            The maximum number of items which the list-choices
  4237.            editor command will list without asking first.
  4238.  
  4239.        listmaxrows (+)
  4240.            The  maximum  number  of  rows  of items which the
  4241.            list-choices editor command will list without ask-
  4242.            ing first.
  4243.  
  4244.        loginsh (+)
  4245.            Set  by the shell if it is a login shell.  Setting
  4246.            or unsetting it within a shell has no effect.  See
  4247.            also shlvl.
  4248.  
  4249.        logout (+)
  4250.            Set  by    the  shell  to    `normal'  before a normal
  4251.            logout, `automatic' before  an  automatic  logout,
  4252.            and  `hangup'  if the shell was killed by a hangup
  4253.            signal (see Signal handling).  See also the autol-
  4254.            ogout shell variable.
  4255.  
  4256.        mail    The names of the files or directories to check for
  4257.            incoming  mail,    separated  by    whitespace,   and
  4258.            optionally  preceeded  by  a numeric word.  Before
  4259.            each prompt, if 10 minutes have passed  since  the
  4260.            last  check,  the  shell checks each file and says
  4261.            `You have new mail.' (or, if mail contains  multi-
  4262.            ple  files,  `You  have new mail in name.') if the
  4263.            filesize is greater than zero in size  and  has    a
  4264.            modification time greater than its access time.
  4265.  
  4266.  
  4267.            If  you are in a login shell, then no mail file is
  4268.            reported unless it has  been  modified  after  the
  4269.            time the shell has started up, in order to prevent
  4270.            redundant notifications.  Most login programs will
  4271.            tell you whether or not you have mail when you log
  4272.            in.
  4273.  
  4274.            If a file specified in mail is  a  directory,  the
  4275.            shell  will  count each file within that directory
  4276.            as a separate message, and will report `You have n
  4277.            mails.'    or  `You have n mails in name.' as appro-
  4278.            priate.    This functionality is provided    primarily
  4279.            for those systems which store mail in this manner,
  4280.            such as the Andrew Mail System.
  4281.  
  4282.            If the first word of mail is numeric it    is  taken
  4283.            as a different mail checking interval, in seconds.
  4284.  
  4285.  
  4286.  
  4287.  
  4288. Astron 6.07.02         27 October 1996               65
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294. TCSH(1)                           TCSH(1)
  4295.  
  4296.  
  4297.            Under  very  rare  circumstances,  the  shell  may
  4298.            report  `You  have mail.' instead of `You have new
  4299.            mail.'
  4300.  
  4301.        matchbeep (+)
  4302.            If set to `never', completion never beeps.  If set
  4303.            to  `nomatch',  it  beeps  only    when  there is no
  4304.            match.  If set to `ambiguous, it beeps when  there
  4305.            are  multiple  matches.    If set to `notunique', it
  4306.            beeps when there is one    exact  and  other  longer
  4307.            matches.  If unset, `ambiguous' is used.
  4308.  
  4309.        nobeep (+)
  4310.            If  set, beeping is completely disabled.  See also
  4311.            visiblebell.
  4312.  
  4313.        noclobber
  4314.            If set, restrictions are placed on output redirec-
  4315.            tion  to  insure  that  files are not accidentally
  4316.            destroyed and  that  `>>'  redirections    refer  to
  4317.            existing  files,  as described in the Input/output
  4318.            section.
  4319.  
  4320.        noglob  If set, Filename substitution and Directory  stack
  4321.            substitution  (q.v.)  are inhibited.  This is most
  4322.            useful in shell scripts which  do  not  deal  with
  4323.            filenames,  or  after a list of filenames has been
  4324.            obtained and further expansions are not desirable.
  4325.  
  4326.        nokanji (+)
  4327.            If  set and the shell supports Kanji (see the ver-
  4328.            sion shell variable), it is disabled so    that  the
  4329.            meta key can be used.
  4330.  
  4331.        nonomatch
  4332.            If set, a Filename substitution or Directory stack
  4333.            substitution  (q.v.)  which  does  not  match  any
  4334.            existing files is left untouched rather than caus-
  4335.            ing an error.  It is still an error for    the  sub-
  4336.            stitution  to  be  malformed,  e.g. `echo [' still
  4337.            gives an error.
  4338.  
  4339.        nostat (+)
  4340.            A list  of  directories    (or  glob-patterns  which
  4341.            match directories; see Filename substitution) that
  4342.            should not be stat(2)ed during a completion opera-
  4343.            tion.  This is usually used to exclude directories
  4344.            which take too much time to stat(2),  for  example
  4345.            /afs.
  4346.  
  4347.        notify  If  set, the shell announces job completions asyn-
  4348.            chronously.  The default is to present job comple-
  4349.            tions just before printing a prompt.
  4350.  
  4351.  
  4352.  
  4353.  
  4354. Astron 6.07.02         27 October 1996               66
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360. TCSH(1)                           TCSH(1)
  4361.  
  4362.  
  4363.        oid (+) The user's real organization ID. (Domain/OS only)
  4364.  
  4365.        owd (+) The  old  working directory, equivalent to the `-'
  4366.            used by cd  and    pushd.     See  also  the  cwd  and
  4367.            dirstack shell variables.
  4368.  
  4369.        path    A  list    of  directories in which to look for exe-
  4370.            cutable commands.  A null word specifies the  cur-
  4371.            rent directory.    If there is no path variable then
  4372.            only full path names will execute.  path is set by
  4373.            the  shell  at  startup    from the PATH environment
  4374.            variable or, if PATH does not exist, to a  system-
  4375.            dependent  default something like `(/usr/local/bin
  4376.            /usr/bsd /bin /usr/bin .)'.  The shell may put `.'
  4377.            first  or last in path or omit it entirely depend-
  4378.            ing on how it was compiled; see the version  shell
  4379.            variable.   A  shell which is given neither the -c
  4380.            nor the -t  option  hashes  the    contents  of  the
  4381.            directories  in    path  after reading ~/.tcshrc and
  4382.            each time path is reset.  If one adds a    new  com-
  4383.            mand  to  a  directory  in path while the shell is
  4384.            active, one may need to do a rehash for the  shell
  4385.            to find it.
  4386.  
  4387.        printexitvalue (+)
  4388.            If  set    and  an  interactive program exits with a
  4389.            non-zero status, the shell prints `Exit status'.
  4390.  
  4391.        prompt  The string which is printed  before  reading  each
  4392.            command from the terminal.  prompt may include any
  4393.            of the following formatting sequences  (+),  which
  4394.            are replaced by the given information:
  4395.  
  4396.            %/  The current working directory.
  4397.            %~  The    current working directory, but with one's
  4398.            home directory represented by  `~'  and  other
  4399.            users' home directories represented by `~user'
  4400.            as per Filename substitution. `~user'  substi-
  4401.            tution  happens  only if the shell has already
  4402.            used `~user' in a pathname in the current ses-
  4403.            sion.
  4404.            %c[[0]n], %.[[0]n]
  4405.            The    trailing component of the current working
  4406.            directory, or n trailing components if a digit
  4407.            n  is given.  If n begins with `0', the number
  4408.            of skipped  components  precede  the  trailing
  4409.            component(s)        in     the       format
  4410.            `/<skipped>trailing'.  If the  ellipsis  shell
  4411.            variable is set, skipped components are repre-
  4412.            sented by an ellipsis  so  the  whole  becomes
  4413.            `...trailing'.  `~' substitution is done as in
  4414.            `%~' above, but the `~' component  is  ignored
  4415.            when counting trailing components.
  4416.            %C  Like %c, but without `~' substitution.
  4417.  
  4418.  
  4419.  
  4420. Astron 6.07.02         27 October 1996               67
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426. TCSH(1)                           TCSH(1)
  4427.  
  4428.  
  4429.            %h, %!, !
  4430.            The current history event number.
  4431.            %M  The full hostname.
  4432.            %m  The hostname up to the first `.'.
  4433.            %S (%s)
  4434.            Start (stop) standout mode.
  4435.            %B (%b)
  4436.            Start (stop) boldfacing mode.
  4437.            %U (%u)
  4438.            Start (stop) underline mode.
  4439.            %t, %@
  4440.            The time of day in 12-hour AM/PM format.
  4441.            %T  Like  `%t', but in 24-hour format (but see the
  4442.            ampm shell variable).
  4443.            %p  The `precise' time of  day  in  12-hour  AM/PM
  4444.            format, with seconds.
  4445.            %P  Like  `%p', but in 24-hour format (but see the
  4446.            ampm shell variable).
  4447.            \c  c is parsed as in bindkey.
  4448.            ^c  c is parsed as in bindkey.
  4449.            %%  A single `%'.
  4450.            %n  The user name.
  4451.            %d  The weekday in `Day' format.
  4452.            %D  The day in `dd' format.
  4453.            %w  The month in `Mon' format.
  4454.            %W  The month in `mm' format.
  4455.            %y  The year in `yy' format.
  4456.            %Y  The year in `yyyy' format.
  4457.            %l  The shell's tty.
  4458.            %L  Clears from the end of the prompt  to  end  of
  4459.            the display or the end of the line.
  4460.            %#  `>' (or the first character of the promptchars
  4461.            shell variable) for normal users, `#' (or  the
  4462.            second character of promptchars) for the supe-
  4463.            ruser.
  4464.            %{string%}
  4465.            Includes string as a literal escape    sequence.
  4466.            It  should  be  used  only  to change terminal
  4467.            attributes and  should  not    move  the  cursor
  4468.            location.  This cannot be the last sequence in
  4469.            prompt.
  4470.            %?  The return code of the command  executed  just
  4471.            before the prompt.
  4472.            %R  In  prompt2,  the  status  of  the parser.  In
  4473.            prompt3, the corrected  string.   In  history,
  4474.            the history string.
  4475.  
  4476.            `%B',  `%S',  `%U'  and `%{string%}' are available
  4477.            only in eight-bit-clean shells;    see  the  version
  4478.            shell variable.
  4479.  
  4480.            The  bold,  standout  and  underline sequences are
  4481.            often used to distinguish a superuser  shell.  For
  4482.            example,
  4483.  
  4484.  
  4485.  
  4486. Astron 6.07.02         27 October 1996               68
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492. TCSH(1)                           TCSH(1)
  4493.  
  4494.  
  4495.            >  set  prompt  =  "%m  [%h] %B[%@]%b [%/] you
  4496.            rang? "
  4497.            tut [37] [2:54pm] [/usr/accts/sys] you rang? _
  4498.  
  4499.            Set by default to `%# ' in interactive shells.
  4500.  
  4501.        prompt2 (+)
  4502.            The string with which to prompt in while and fore-
  4503.            ach loops and after lines ending in `\'.  The same
  4504.            format  sequences may be used as in prompt (q.v.);
  4505.            note the variable meaning of `%R'.  Set by default
  4506.            to `%R? ' in interactive shells.
  4507.  
  4508.        prompt3 (+)
  4509.            The  string  with  which to prompt when confirming
  4510.            automatic spelling correction.    The  same  format
  4511.            sequences  may  be  used as in prompt (q.v.); note
  4512.            the variable meaning of `%R'.  Set by  default  to
  4513.            `CORRECT>%R (y|n|e|a)? ' in interactive shells.
  4514.  
  4515.        promptchars (+)
  4516.            If  set (to a two-character string), the `%#' for-
  4517.            matting sequence in the prompt shell  variable  is
  4518.            replaced with the first character for normal users
  4519.            and the second character for the superuser.
  4520.  
  4521.        pushdtohome (+)
  4522.            If set, pushd without arguments    does  `pushd  ~',
  4523.            like cd.
  4524.  
  4525.        pushdsilent (+)
  4526.            If  set, pushd and popd do not print the directory
  4527.            stack.
  4528.  
  4529.        recexact (+)
  4530.            If set, completion completes  on  an  exact  match
  4531.            even if a longer match is possible.
  4532.  
  4533.        recognize_only_executables (+)
  4534.            If set, command listing displays only files in the
  4535.            path that are executable. Slow.
  4536.  
  4537.        rmstar (+)
  4538.            If set, the user is prompted before `rm *' is exe-
  4539.            cuted.
  4540.  
  4541.        savedirs (+)
  4542.            If set, the shell does `dirs -S' before exiting.
  4543.  
  4544.        savehist
  4545.            If  set,  the shell does `history -S' before exit-
  4546.            ing.  If the first word is set  to  a  number,  at
  4547.            most  that many lines are saved.  (The number must
  4548.            be less than or equal to history.)  If the  second
  4549.  
  4550.  
  4551.  
  4552. Astron 6.07.02         27 October 1996               69
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558. TCSH(1)                           TCSH(1)
  4559.  
  4560.  
  4561.            word is set to `merge', the history list is merged
  4562.            with the existing history file instead of  replac-
  4563.            ing  it (if there is one) and sorted by time stamp
  4564.            and the most recent events are retained. (+)
  4565.  
  4566.        sched (+)
  4567.            The format in  which  the  sched  builtin  command
  4568.            prints     scheduled    events;    if   not   given,
  4569.            `%h\t%T\t%R\n' is used.    The format sequences  are
  4570.            described  above  under    prompt; note the variable
  4571.            meaning of `%R'.
  4572.  
  4573.        shell   The file in which the shell resides.  This is used
  4574.            in  forking  shells  to interpret files which have
  4575.            execute bits set, but which are not executable  by
  4576.            the  system.   (See the description of Builtin and
  4577.            non-builtin command  execution.)   Initialized  to
  4578.            the (system-dependent) home of the shell.
  4579.  
  4580.        shlvl (+)
  4581.            The  number of nested shells.  Reset to 1 in login
  4582.            shells.    See also loginsh.
  4583.  
  4584.        status  The status returned by the last    command.   If  it
  4585.            terminated  abnormally,    then 0200 is added to the
  4586.            status.    Builtin commands which fail  return  exit
  4587.            status `1', all other builtin commands return sta-
  4588.            tus `0'.
  4589.  
  4590.        symlinks (+)
  4591.            Can be set to several different values to  control
  4592.            symbolic link (`symlink') resolution:
  4593.  
  4594.            If  set to `chase', whenever the current directory
  4595.            changes to a directory containing a symbolic link,
  4596.            it  is  expanded to the real name of the directory
  4597.            to which the link points. This does not    work  for
  4598.            the user's home directory; this is a bug.
  4599.  
  4600.            If set to `ignore', the shell tries to construct a
  4601.            current directory relative to the  current  direc-
  4602.            tory before the link was crossed.  This means that
  4603.            cding through a symbolic link and then `cd  ..'ing
  4604.            returns    one  to the original directory. This only
  4605.            affects builtin commands and filename  completion.
  4606.  
  4607.            If  set    to  `expand', the shell tries to fix sym-
  4608.            bolic links by actually expanding arguments  which
  4609.            look  like  path  names. This affects any command,
  4610.            not just builtins. Unfortunately,  this    does  not
  4611.            work  for  hard-to-recognize  filenames,  such  as
  4612.            those embedded in command options.  Expansion  may
  4613.            be  prevented  by  quoting.  While this setting is
  4614.            usually    the  most  convenient,    it  is    sometimes
  4615.  
  4616.  
  4617.  
  4618. Astron 6.07.02         27 October 1996               70
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624. TCSH(1)                           TCSH(1)
  4625.  
  4626.  
  4627.            misleading  and    sometimes confusing when it fails
  4628.            to recognize an argument which should be expanded.
  4629.            A compromise is to use `ignore' and use the editor
  4630.            command normalize-path (bound by default to  ^X-n)
  4631.            when necessary.
  4632.  
  4633.            Some  examples  are  in order. First, let's set up
  4634.            some play directories:
  4635.  
  4636.            > cd /tmp
  4637.            > mkdir from from/src to
  4638.            > ln -s from/src to/dist
  4639.  
  4640.            Here's the behavior with symlinks unset,
  4641.  
  4642.            > cd /tmp/to/dist; echo $cwd
  4643.            /tmp/to/dist
  4644.            > cd ..; echo $cwd
  4645.            /tmp/from
  4646.  
  4647.            here's the behavior with symlinks set to `chase',
  4648.  
  4649.            > cd /tmp/to/dst; echo $cwd
  4650.            /tmp/from/src
  4651.            > cd ..; echo $cwd
  4652.            /tmp/from
  4653.  
  4654.            here's the behavior with symlinks set to `ignore',
  4655.  
  4656.            > cd /tmp/to/dist; echo $cwd
  4657.            /tmp/to/dst
  4658.            > cd ..; echo $cwd
  4659.            /tmp/to
  4660.  
  4661.            and  here's  the  behavior  with  symlinks  set to
  4662.            `expand'.
  4663.  
  4664.            > cd /tmp/to/dist; echo $cwd
  4665.            /tmp/to/dst
  4666.            > cd ..; echo $cwd
  4667.            /tmp/to
  4668.            > cd /tmp/to/dist; echo $cwd
  4669.            /tmp/to/dst
  4670.            > cd ".."; echo $cwd
  4671.            /tmp/from
  4672.            > /bin/echo ..
  4673.            /tmp/to
  4674.            > /bin/echo ".."
  4675.            ..
  4676.  
  4677.            Note that `expand' expansion 1)    works  just  like
  4678.            `ignore'  for builtins like cd, 2) is prevented by
  4679.            quoting,  and  3)  happens  before  filenames  are
  4680.            passed to non-builtin commands.
  4681.  
  4682.  
  4683.  
  4684. Astron 6.07.02         27 October 1996               71
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690. TCSH(1)                           TCSH(1)
  4691.  
  4692.  
  4693.        tcsh (+)
  4694.            The  version  number  of  the  shell in the format
  4695.            `R.VV.PP', where `R' is the major release  number,
  4696.            `VV'  the current version and `PP' the patchlevel.
  4697.  
  4698.        term    The terminal type.  Usually  set  in  ~/.login  as
  4699.            described under Startup and shutdown.
  4700.  
  4701.        time    If  set    to a number, then the time builtin (q.v.)
  4702.            executes automatically after  each  command  which
  4703.            takes  more  than that many CPU seconds.  If there
  4704.            is a second word, it is used as    a  format  string
  4705.            for  the  output of the time builtin. (u) The fol-
  4706.            lowing sequences may be used in the format string:
  4707.  
  4708.            %U  The time the process spent in user mode in cpu
  4709.            seconds.
  4710.            %S  The time the process spent in kernel  mode  in
  4711.            cpu seconds.
  4712.            %E  The elapsed (wall clock) time in seconds.
  4713.            %P  The CPU percentage computed as (%U + %S) / %E.
  4714.            %W  Number of times the process was swapped.
  4715.            %X  The average amount in (shared) text space used
  4716.            in Kbytes.
  4717.            %D  The    average  amount  in (unshared) data/stack
  4718.            space used in Kbytes.
  4719.            %K  The total space used (%X + %D) in Kbytes.
  4720.            %M  The maximum memory the process had in  use  at
  4721.            any time in Kbytes.
  4722.            %F  The    number    of major page faults (page needed
  4723.            to be brought from disk).
  4724.            %R  The number of minor page faults.
  4725.            %I  The number of input operations.
  4726.            %O  The number of output operations.
  4727.            %r  The number of socket messages received.
  4728.            %s  The number of socket messages sent.
  4729.            %k  The number of signals received.
  4730.            %w  The    number    of  voluntary  context     switches
  4731.            (waits).
  4732.            %c  The number of involuntary context switches.
  4733.  
  4734.            Only  the  first  four  sequences are supported on
  4735.            systems without BSD resource limit functions.  The
  4736.            default    time  format  is  `%Uu    %Ss  %E %P %X+%Dk
  4737.            %I+%Oio    %Fpf+%Ww'  for     systems   that   support
  4738.            resource  usage    reporting and `%Uu %Ss %E %P' for
  4739.            systems that do not.
  4740.  
  4741.            Under Sequent's DYNIX/ptx, %X, %D, %K, %r  and  %s
  4742.            are  not  available,  but the following additional
  4743.            sequences are:
  4744.  
  4745.            %Y  The number of system calls performed.
  4746.            %Z  The number of pages which are  zero-filled  on
  4747.  
  4748.  
  4749.  
  4750. Astron 6.07.02         27 October 1996               72
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756. TCSH(1)                           TCSH(1)
  4757.  
  4758.  
  4759.            demand.
  4760.            %i  The    number    of times a process's resident set
  4761.            size was increased by the kernel.
  4762.            %d  The number of times a process's  resident  set
  4763.            size was decreased by the kernel.
  4764.            %l  The number of read system calls performed.
  4765.            %m  The number of write system calls performed.
  4766.            %p  The number of reads from raw disk devices.
  4767.            %q  The number of writes to raw disk devices.
  4768.  
  4769.            and  the  default  time    format    is `%Uu %Ss $E %P
  4770.            %I+%Oio %Fpf+%Ww'.  Note that the  CPU  percentage
  4771.            can be higher than 100% on multi-processors.
  4772.  
  4773.        tperiod (+)
  4774.            The  period, in minutes, between executions of the
  4775.            periodic special alias.
  4776.  
  4777.        tty (+) The name of the tty, or empty if not  attached  to
  4778.            one.
  4779.  
  4780.        uid (+) The user's real user ID.
  4781.  
  4782.        user    The user's login name.
  4783.  
  4784.        verbose If  set,  causes  the  words of each command to be
  4785.            printed, after history substitution (if any).  Set
  4786.            by the -v command line option.
  4787.  
  4788.        version (+)
  4789.            The version ID stamp. It contains the shell's ver-
  4790.            sion number (see tcsh), origin, release date, ven-
  4791.            dor,  operating    system    and  machine (see VENDOR,
  4792.            OSTYPE and MACHTYPE) and a comma-separated list of
  4793.            options    which  were set at compile time.  Options
  4794.            which are set by default in the    distribution  are
  4795.            noted.
  4796.  
  4797.            8b  The shell is eight bit clean; default
  4798.            7b  The shell is not eight bit clean
  4799.            nls The    system's NLS is used; default for systems
  4800.            with NLS
  4801.            lf  Login  shells  execute  /etc/csh.login  before
  4802.            instead  of    after /etc/csh.cshrc and ~/.login
  4803.            before instead of after ~/.tcshrc and  ~/.his-
  4804.            tory.
  4805.            dl  `.' is put last in path for security; default
  4806.            nd  `.' is omitted from path for security
  4807.            vi  vi-style  editing  is  the default rather than
  4808.            emacs
  4809.            dtr Login shells drop DTR when exiting
  4810.            bye bye is a synonym for  logout  and  log  is  an
  4811.            alternate name for watchlog
  4812.            al  autologout is enabled; default
  4813.  
  4814.  
  4815.  
  4816. Astron 6.07.02         27 October 1996               73
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822. TCSH(1)                           TCSH(1)
  4823.  
  4824.  
  4825.            kan Kanji  is  used  and  the ISO character set is
  4826.            ignored, unless the nokanji shell variable  is
  4827.            set
  4828.            sm  The system's malloc(3) is used
  4829.            hb  The    `#!<program>  <args>'  convention is emu-
  4830.            lated when executing shell scripts
  4831.            ng  The newgrp builtin is available
  4832.            rh  The shell attempts to set the REMOTEHOST envi-
  4833.            ronment variable
  4834.            afs The shell verifies your password with the ker-
  4835.            beros server if  local  authentication  fails.
  4836.            The    afsuser  shell    variable  or  the AFSUSER
  4837.            environment variable override your local user-
  4838.            name if set.
  4839.  
  4840.            An  administrator  may enter additional strings to
  4841.            indicate differences in the local version.
  4842.  
  4843.        visiblebell (+)
  4844.            If set, a screen flash is  used    rather    than  the
  4845.            audible bell.  See also nobeep.
  4846.  
  4847.        watch (+)
  4848.            A  list of user/terminal pairs to watch for logins
  4849.            and logouts.  If either the user is `any' all ter-
  4850.            minals  are  watched  for  the given user and vice
  4851.            versa.  Setting watch to `(any any)'  watches  all
  4852.            users and terminals.  For example,
  4853.  
  4854.            set    watch  =  (george ttyd1 any console $user
  4855.            any)
  4856.  
  4857.            reports activity of the user  `george'  on  ttyd1,
  4858.            any  user  on the console, and oneself (or a tres-
  4859.            passer) on any terminal.
  4860.  
  4861.            Logins and logouts are checked every 10 minutes by
  4862.            default, but the first word of watch can be set to
  4863.            a number to check  every  so  many  minutes.   For
  4864.            example,
  4865.  
  4866.            set watch = (1 any any)
  4867.  
  4868.            reports    any  login/logout  once every minute. For
  4869.            the impatient, the log builtin command triggers    a
  4870.            watch  report  at any time. All current logins are
  4871.            reported (as with the log builtin) when    watch  is
  4872.            first set.
  4873.  
  4874.            The  who  shell    variable  controls  the format of
  4875.            watch reports.
  4876.  
  4877.        who (+) The format string for watch messages. The  follow-
  4878.            ing   sequences     are   replaced   by   the  given
  4879.  
  4880.  
  4881.  
  4882. Astron 6.07.02         27 October 1996               74
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888. TCSH(1)                           TCSH(1)
  4889.  
  4890.  
  4891.            information:
  4892.  
  4893.            %n  The name of the user who logged in/out.
  4894.            %a  The observed action, i.e. `logged on', `logged
  4895.            off' or `replaced olduser on'.
  4896.            %l  The    terminal  (tty)  on which the user logged
  4897.            in/out.
  4898.            %M  The full  hostname  of  the    remote    host,  or
  4899.            `local' if the login/logout was from the local
  4900.            host.
  4901.            %m  The hostname of the    remote    host  up  to  the
  4902.            first  `.'.    The full name is printed if it is
  4903.            an IP address or an X Window System display.
  4904.  
  4905.            %M and %m are  available  only  on  systems  which
  4906.            store the remote hostname in /etc/utmp.    If unset,
  4907.            `%n has %a %l from %m.' is used,  or  `%n  has  %a
  4908.            %l.' on systems which don't store the remote host-
  4909.            name.
  4910.  
  4911.        wordchars (+)
  4912.            A list of non-alphanumeric characters to  be  con-
  4913.            sidered    part of a word by the forward-word, back-
  4914.            ward-word  etc.    editor     commands.    If   unset,
  4915.            `*?_-.[]~=' is used.
  4916.  
  4917. ENVIRONMENT
  4918.        AFSUSER (+)
  4919.            Equivalent to the afsuser shell variable.
  4920.  
  4921.        COLUMNS The  number of columns in the terminal. See Termi-
  4922.            nal management.
  4923.  
  4924.        DISPLAY Used by X Window System (see X(1)).  If    set,  the
  4925.            shell does not set autologout (q.v.).
  4926.  
  4927.        EDITOR  The  pathname  to  a default editor.  See also the
  4928.            VISUAL environment variable and the  run-fg-editor
  4929.            editor command.
  4930.  
  4931.        GROUP (+)
  4932.            Equivalent to the group shell variable.
  4933.  
  4934.        HOME    Equivalent to the home shell variable.
  4935.  
  4936.        HOST (+)
  4937.            Initialized  to    the  name of the machine on which
  4938.            the shell is running, as determined by  the  geth-
  4939.            ostname(2) system call.
  4940.  
  4941.        HOSTTYPE (+)
  4942.            Initialized  to    the  type of machine on which the
  4943.            shell is running, as determined at  compile  time.
  4944.            This variable is obsolete and will be removed in a
  4945.  
  4946.  
  4947.  
  4948. Astron 6.07.02         27 October 1996               75
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954. TCSH(1)                           TCSH(1)
  4955.  
  4956.  
  4957.            future version.
  4958.  
  4959.        HPATH (+)
  4960.            A colon-separated list of directories in which the
  4961.            run-help editor command looks for command documen-
  4962.            tation.
  4963.  
  4964.        LANG    Gives the preferred  character  environment.   See
  4965.            Native Language System support.
  4966.  
  4967.        LC_CTYPE
  4968.            If  set, only ctype character handling is changed.
  4969.            See Native Language System support.
  4970.  
  4971.        LINES   The number of lines in the terminal. See  Terminal
  4972.            management.
  4973.  
  4974.        MACHTYPE (+)
  4975.            The  machine type (microprocessor class or machine
  4976.            model), as determined at compile time.
  4977.  
  4978.        NOREBIND (+)
  4979.            If set, printable characters are  not  rebound  to
  4980.            self-insert-command.   See  Native Language System
  4981.            support.
  4982.  
  4983.        OSTYPE (+)
  4984.            The operating system,  as  determined  at  compile
  4985.            time.
  4986.  
  4987.        PATH    A  colon-separated list of directories in which to
  4988.            look for  executables.    Equivalent  to    the  path
  4989.            shell variable, but in a different format.
  4990.  
  4991.        PWD (+) Equivalent to the cwd shell variable, but not syn-
  4992.            chronized to it;  updated  only    after  an  actual
  4993.            directory change.
  4994.  
  4995.        REMOTEHOST (+)
  4996.            The  host  from    which  the  user  has  logged  in
  4997.            remotely, if this is the case  and  the    shell  is
  4998.            able to determine it. Set only if the shell was so
  4999.            compiled; see the version shell variable.
  5000.  
  5001.        SHLVL (+)
  5002.            Equivalent to the shlvl shell variable.
  5003.  
  5004.        SYSTYPE (+)
  5005.            The current system type. (Domain/OS only)
  5006.  
  5007.        TERM    Equivalent to the term shell variable.
  5008.  
  5009.        TERMCAP The terminal capability string. See Terminal  man-
  5010.            agement.
  5011.  
  5012.  
  5013.  
  5014. Astron 6.07.02         27 October 1996               76
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020. TCSH(1)                           TCSH(1)
  5021.  
  5022.  
  5023.        USER    Equivalent to the user shell variable.
  5024.  
  5025.        VENDOR (+)
  5026.            The vendor, as determined at compile time.
  5027.  
  5028.        VISUAL  The pathname to a default full-screen editor.  See
  5029.            also the EDITOR environment variable and the  run-
  5030.            fg-editor editor command.
  5031.  
  5032. FILES
  5033.        /etc/csh.cshrc  Read  first  by    every  shell.    ConvexOS,
  5034.                Stellix and Intel use /etc/cshrc and NeXTs
  5035.                use  /etc/cshrc.std.  A/UX, AMIX, Cray and
  5036.                IRIX have no  equivalent  in  csh(1),  but
  5037.                read  this  file  in tcsh anyway.  Solaris
  5038.                2.x does not  have  it  either,    but  tcsh
  5039.                reads /etc/.cshrc. (+)
  5040.        /etc/csh.login  Read by login shells after /etc/csh.cshrc.
  5041.                ConvexOS,   Stellix    and    Intel    use
  5042.                /etc/login,   NeXTs   use  /etc/login.std,
  5043.                Solaris 2.x  uses  /etc/.login  and  A/UX,
  5044.                AMIX, Cray and IRIX use /etc/cshrc.
  5045.        ~/.tcshrc (+)   Read  by  every shell after /etc/csh.cshrc
  5046.                or its equivalent.
  5047.        ~/.cshrc        Read by every shell, if ~/.tcshrc  doesn't
  5048.                exist, after /etc/csh.cshrc or its equiva-
  5049.                lent.  This  manual  uses  `~/.tcshrc'  to
  5050.                mean  `~/.tcshrc  or,  if ~/.tcshrc is not
  5051.                found, ~/.cshrc'.
  5052.        ~/.history      Read by login shells  after  ~/.tcshrc  if
  5053.                savehist is set, but see also histfile.
  5054.        ~/.login        Read  by  login    shells after ~/.tcshrc or
  5055.                ~/.history.  The shell may be compiled  to
  5056.                read  ~/.login  before  instead    of  after
  5057.                ~/.tcshrc and ~/.history; see the  version
  5058.                shell variable.
  5059.        ~/.cshdirs (+)  Read  by  login    shells    after ~/.login if
  5060.                savedirs is set, but see also dirsfile.
  5061.        /etc/csh.logout Read by login shells at logout.    ConvexOS,
  5062.                Stellix    and  Intel  use  /etc/logout  and
  5063.                NeXTs use  /etc/logout.std.   A/UX,  AMIX,
  5064.                Cray   and  IRIX  have  no  equivalent  in
  5065.                csh(1), but read this file in tcsh anyway.
  5066.                Solaris    2.x  does not have it either, but
  5067.                tcsh reads /etc/.cshrc. (+)
  5068.        ~/.logout       Read  by  login    shells    at  logout  after
  5069.                /etc/csh.logout or its equivalent.
  5070.        /bin/sh           Used to interpret shell scripts not start-
  5071.                ing with a `#'.
  5072.        /tmp/sh*        Temporary file for `<<'.
  5073.        /etc/passwd     Source of  home    directories  for  `~name'
  5074.                substitutions.
  5075.  
  5076.        The  order  in  which startup files are read may differ if
  5077.  
  5078.  
  5079.  
  5080. Astron 6.07.02         27 October 1996               77
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086. TCSH(1)                           TCSH(1)
  5087.  
  5088.  
  5089.        the shell was so compiled; see Startup  and  shutdown  and
  5090.        the version shell variable.
  5091.  
  5092. NEW FEATURES (+)
  5093.        This manual describes tcsh as a single entity, but experi-
  5094.        enced csh(1) users will want to pay special  attention  to
  5095.        tcsh's new features.
  5096.  
  5097.        A   command-line  editor,  which  supports  GNU    Emacs  or
  5098.        vi(1)-style key bindings. See The command-line editor  and
  5099.        Editor commands.
  5100.  
  5101.        Programmable,  interactive  word  completion  and listing.
  5102.        See Completion and listing and the complete and uncomplete
  5103.        builtin commands.
  5104.  
  5105.        Spelling  correction  (q.v.)  of  filenames,  commands and
  5106.        variables.
  5107.  
  5108.        Editor commands (q.v.) which perform  other  useful  func-
  5109.        tions  in the middle of typed commands, including documen-
  5110.        tation lookup (run-help), quick editor restarting (run-fg-
  5111.        editor) and command resolution (which-command).
  5112.  
  5113.        An  enhanced history mechanism. Events in the history list
  5114.        are time-stamped.  See also the history    command  and  its
  5115.        associated  shell  variables,  the previously undocumented
  5116.        `#' event specifier and new modifiers under  History  sub-
  5117.        stitution,  the    *-history,  history-search-*, i-search-*,
  5118.        vi-search-* and toggle-literal-history editor commands and
  5119.        the histlit shell variable.
  5120.  
  5121.        Enhanced  directory  parsing and directory stack handling.
  5122.        See the cd, pushd, popd and dirs commands and their  asso-
  5123.        ciated shell variables, the description of Directory stack
  5124.        substitution, the dirstack, owd and symlinks  shell  vari-
  5125.        ables  and the normalize-command and normalize-path editor
  5126.        commands.
  5127.  
  5128.        Negation in glob-patterns. See Filename substitution.
  5129.  
  5130.        New File inquiry operators (q.v.) and a    filetest  builtin
  5131.        which uses them.
  5132.  
  5133.        A  variety  of Automatic, periodic and timed events (q.v.)
  5134.        including scheduled  events,  special  aliases,    automatic
  5135.        logout  and  terminal locking, command timing and watching
  5136.        for logins and logouts.
  5137.  
  5138.        Support for the Native Language System  (see  Native  Lan-
  5139.        guage System support), OS variant features (see OS variant
  5140.        support and the echo_style  shell  variable)  and  system-
  5141.        dependent file locations (see FILES).
  5142.  
  5143.  
  5144.  
  5145.  
  5146. Astron 6.07.02         27 October 1996               78
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152. TCSH(1)                           TCSH(1)
  5153.  
  5154.  
  5155.        Extensive  terminal-managment  capabilities.  See Terminal
  5156.        management.
  5157.  
  5158.        New builtin commands including builtins, hup,  ls-F,  new-
  5159.        grp, printenv, which and where (q.v.).
  5160.  
  5161.        New  variables  that make useful information easily avail-
  5162.        able to the shell.  See    the  gid,  loginsh,  oid,  shlvl,
  5163.        tcsh,  tty,  uid and version shell variables and the HOST,
  5164.        REMOTEHOST, VENDOR, OSTYPE and MACHTYPE environment  vari-
  5165.        ables.
  5166.  
  5167.        A  new  syntax  for  including  useful  information in the
  5168.        prompt string (see prompt).  and special prompts for loops
  5169.        and spelling correction (see prompt2 and prompt3).
  5170.  
  5171.        Read-only variables. See Variable substitution.
  5172.  
  5173. BUGS
  5174.        When  a    suspended  command is restarted, the shell prints
  5175.        the directory it started in if this is different from  the
  5176.        current    directory. This can be misleading (i.e. wrong) as
  5177.        the job may have changed directories internally.
  5178.  
  5179.        Shell builtin  functions  are  not  stoppable/restartable.
  5180.        Command    sequences  of  the  form `a ; b ; c' are also not
  5181.        handled gracefully when stopping  is  attempted.   If  you
  5182.        suspend    `b', the shell will then immediately execute `c'.
  5183.        This is especially noticeable if  this  expansion  results
  5184.        from  an  alias. It suffices to place the sequence of com-
  5185.        mands in ()'s to force it to a subshell, i.e. `( a ; b ; c
  5186.        )'.
  5187.  
  5188.        Control    over  tty  output  after processes are started is
  5189.        primitive; perhaps this will inspire someone to work on    a
  5190.        good  virtual  terminal    interface.  In a virtual terminal
  5191.        interface much more interesting things could be done  with
  5192.        output control.
  5193.  
  5194.        Alias substitution is most often used to clumsily simulate
  5195.        shell procedures;  shell  procedures  should  be  provided
  5196.        rather than aliases.
  5197.  
  5198.        Commands  within loops are not placed in the history list.
  5199.        Control structures should be parsed rather than being rec-
  5200.        ognized    as  built-in  commands.  This would allow control
  5201.        commands to be placed anywhere, to be combined  with  `|',
  5202.        and to be used with `&' and `;' metasyntax.
  5203.  
  5204.        foreach doesn't ignore here documents when looking for its
  5205.        end.
  5206.  
  5207.        It should be possible to use the `:' modifiers on the out-
  5208.        put of command substitutions.
  5209.  
  5210.  
  5211.  
  5212. Astron 6.07.02         27 October 1996               79
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218. TCSH(1)                           TCSH(1)
  5219.  
  5220.  
  5221.        The  screen  update for lines longer than the screen width
  5222.        is very poor if the terminal cannot  move  the  cursor  up
  5223.        (i.e. terminal type `dumb').
  5224.  
  5225.        HPATH and NOREBIND don't need to be environment variables.
  5226.  
  5227.        Glob-patterns which do not use `?', `*' or `[]'    or  which
  5228.        use `{}' or `~' are not negated correctly.
  5229.  
  5230.        The single-command form of if does output redirection even
  5231.        if the expression is false and the  command  is    not  exe-
  5232.        cuted.
  5233.  
  5234.        ls-F  includes file identification characters when sorting
  5235.        filenames and does not handle control characters in  file-
  5236.        names well. It cannot be interrupted.
  5237.  
  5238.        Report bugs to tcsh-bugs@mx.gw.com, preferably with fixes.
  5239.        If you want to help maintain and test tcsh, send  mail  to
  5240.        listserv@mx.gw.com  with  the  text  `subscribe tcsh <your
  5241.        name>' on a line by itself in the body. You can also `sub-
  5242.        scribe  tcsh-bugs  <your name>' to get all bug reports, or
  5243.        `subscribe tcsh-diffs <your name>' to get the  development
  5244.        list plus diffs for each patchlevel.
  5245.  
  5246. THE T IN TCSH
  5247.        In  1964,  DEC  produced the PDP-6. The PDP-10 was a later
  5248.        re-implementation. It was re-christened    the  DECsystem-10
  5249.        in  1970  or so when DEC brought out the second model, the
  5250.        KI10.
  5251.  
  5252.        TENEX was created at Bolt, Beranek & Newman (a  Cambridge,
  5253.        Mass. think tank) in 1972 as an experiment in demand-paged
  5254.        virtual memory operating systems. They built a  new  pager
  5255.        for  the  DEC  PDP-10 and created the OS to go with it. It
  5256.        was extremely successful in academia.
  5257.  
  5258.        In 1975, DEC brought out a new model of    the  PDP-10,  the
  5259.        KL10; they intended to have only a version of TENEX, which
  5260.        they had licensed from BBN, for the new box.  They  called
  5261.        their  version  TOPS-20    (their    capitalization    is trade-
  5262.        marked).  A lot of TOPS-10 users  (`The    OPerating  System
  5263.        for  PDP-10') objected; thus DEC found themselves support-
  5264.        ing two incompatible systems  on  the  same  hardware--but
  5265.        then there were 6 on the PDP-11!
  5266.  
  5267.        TENEX,  and  TOPS-20  to version 3, had command completion
  5268.        via a user-code-level subroutine  library  called  ULTCMD.
  5269.        With  version  3,  DEC  moved all that capability and more
  5270.        into the monitor (`kernel' for you Unix    types),  accessed
  5271.        by  the    COMND%    JSYS  (`Jump  to SYStem' instruction, the
  5272.        supervisor call mechanism [are my  IBM  roots  also  show-
  5273.        ing?]).
  5274.  
  5275.  
  5276.  
  5277.  
  5278. Astron 6.07.02         27 October 1996               80
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284. TCSH(1)                           TCSH(1)
  5285.  
  5286.  
  5287.        The creator of tcsh was impressed by this feature and sev-
  5288.        eral others of TENEX and TOPS-20, and created a version of
  5289.        csh which mimicked them.
  5290.  
  5291. LIMITATIONS
  5292.        Words can be no longer than 1024 characters.
  5293.  
  5294.        The system limits argument lists to 10240 characters.
  5295.  
  5296.        The  number of arguments to a command which involves file-
  5297.        name expansion is limited to 1/6th the number  of  charac-
  5298.        ters allowed in an argument list.
  5299.  
  5300.        Command    substitutions  may  substitute no more characters
  5301.        than are allowed in an argument list.
  5302.  
  5303.        To detect looping, the shell restricts the number of alias
  5304.        substitutions on a single line to 20.
  5305.  
  5306. SEE ALSO
  5307.        csh(1),    emacs(1),  ls(1),  newgrp(1),  sh(1), setpath(1),
  5308.        stty(1),   su(1),   tset(1),   vi(1),   x(1),   access(2),
  5309.        execve(2),   fork(2),  killpg(2),  pipe(2),  setrlimit(2),
  5310.        sigvec(2),  stat(2),  umask(2),    vfork(2),  wait(2),  mal-
  5311.        loc(3),    setlocale(3), tty(4), a.out(5), termcap(5), envi-
  5312.        ron(7), termio(7), Introduction to the C Shell
  5313.  
  5314. VERSION
  5315.        This manual documents tcsh 6.07.02 (Astron) 1996-10-27.
  5316.  
  5317. AUTHORS
  5318.        William Joy
  5319.      Original author of csh(1)
  5320.        J.E. Kulp, IIASA, Laxenburg, Austria
  5321.      Job control and directory stack features
  5322.        Ken Greer, HP Labs, 1981
  5323.      File name completion
  5324.        Mike Ellis, Fairchild, 1983
  5325.      Command name recognition/completion
  5326.        Paul Placeway, Ohio State CIS Dept., 1983-1993
  5327.      Command line editor, prompt routines,    new  glob  syntax
  5328.      and numerous fixes and speedups
  5329.        Karl Kleinpaste, CCI 1983-4
  5330.      Special   aliases,  directory    stack  extraction  stuff,
  5331.      login/logout watch, scheduled events, and  the  idea  of
  5332.      the new prompt format
  5333.        Rayan Zachariassen, University of Toronto, 1984
  5334.      ls-F  and which builtins and numerous bug fixes, modifi-
  5335.      cations and speedups
  5336.        Chris Kingsley, Caltech
  5337.      Fast storage allocator routines
  5338.        Chris Grevstad, TRW, 1987
  5339.      Incorporated 4.3BSD csh into tcsh
  5340.  
  5341.  
  5342.  
  5343.  
  5344. Astron 6.07.02         27 October 1996               81
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350. TCSH(1)                           TCSH(1)
  5351.  
  5352.  
  5353.        Christos S. Zoulas, Cornell U. EE Dept., 1987-94
  5354.      Ports to HPUX, SVR2 and SVR3, a SysV version of getwd.c,
  5355.      SHORT_STRINGS support and a new version of sh.glob.c
  5356.        James J Dempsey, BBN, and Paul Placeway, OSU, 1988
  5357.      A/UX port
  5358.        Daniel Long, NNSC, 1988
  5359.      wordchars
  5360.        Patrick Wolfe, Kuck and Associates, Inc., 1988
  5361.      vi mode cleanup
  5362.        David C Lawrence, Rensselaer Polytechnic Institute, 1989
  5363.      autolist and ambiguous completion listing
  5364.        Alec Wolman, DEC, 1989
  5365.      Newlines in the prompt
  5366.        Matt Landau, BBN, 1989
  5367.      ~/.tcshrc
  5368.        Ray Moody, Purdue Physics, 1989
  5369.      Magic spacebar history expansion
  5370.        Mordechai ????, Intel, 1989
  5371.      printprompt() fixes and additions
  5372.        Kazuhiro Honda, Dept. of Computer Science, Keio
  5373.      University, 1989
  5374.      Automatic spelling correction and prompt3
  5375.        Per Hedeland, Ellemtel, Sweden, 1990-
  5376.      Various bugfixes, improvements and manual updates
  5377.        Hans J. Albertsson (Sun Sweden)
  5378.      ampm, settc and telltc
  5379.        Michael Bloom
  5380.      Interrupt handling fixes
  5381.        Michael Fine, Digital Equipment Corp
  5382.      Extended key support
  5383.        Eric Schnoebelen, Convex, 1990
  5384.      Convex support, lots of csh bug fixes, save and  restore
  5385.      of directory stack
  5386.        Ron Flax, Apple, 1990
  5387.      A/UX 2.0 (re)port
  5388.        Dan Oscarsson, LTH Sweden, 1990
  5389.      NLS support and simulated NLS support for non NLS sites,
  5390.      fixes
  5391.        Johan Widen, SICS Sweden, 1990
  5392.      shlvl, Mach support, correct-line, 8-bit printing
  5393.        Matt Day, Sanyo Icon, 1990
  5394.      POSIX termio support, SysV limit fixes
  5395.        Jaap Vermeulen, Sequent, 1990-91
  5396.      Vi mode fixes, expand-line, window change fixes,  Symme-
  5397.      try port
  5398.        Martin Boyer, Institut de recherche d'Hydro-Quebec, 1991
  5399.      autolist beeping options, modified the history search to
  5400.      search for the whole string from the  beginning  of  the
  5401.      line to the cursor.
  5402.        Scott Krotz, Motorola, 1991
  5403.      Minix port
  5404.        David Dawes, Sydney U. Australia, Physics Dept., 1991
  5405.      SVR4 job control fixes
  5406.  
  5407.  
  5408.  
  5409.  
  5410. Astron 6.07.02         27 October 1996               82
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416. TCSH(1)                           TCSH(1)
  5417.  
  5418.  
  5419.        Jose Sousa, Interactive Systems Corp., 1991
  5420.      Extended vi fixes and vi delete command
  5421.        Marc Horowitz, MIT, 1991
  5422.      ANSIfication  fixes, new exec hashing code, imake fixes,
  5423.      where
  5424.        Bruce Sterling Woodcock, sterling@netcom.com, 1991-1995
  5425.      ETA  and  Pyramid  port,  Makefile   and   lint   fixes,
  5426.      ignoreeof=n  addition,  and  various  other  portability
  5427.      changes and bug fixes
  5428.        Jeff Fink, 1992
  5429.      complete-word-fwd and complete-word-back
  5430.        Harry C. Pulley, 1992
  5431.      Coherent port
  5432.        Andy Phillips, Mullard Space Science Lab U.K., 1992
  5433.      VMS-POSIX port
  5434.        Beto Appleton, IBM Corp., 1992
  5435.      Walking process group fixes, csh bug fixes,  POSIX  file
  5436.      tests, POSIX SIGHUP
  5437.        Scott Bolte, Cray Computer Corp., 1992
  5438.      CSOS port
  5439.        Kaveh R. Ghazi, Rutgers University, 1992
  5440.      Tek, m88k, Titan and Masscomp ports and fixes
  5441.        Mark Linderman, Cornell University, 1992
  5442.      OS/2 port
  5443.        Mika Liljeberg, liljeber@kruuna.Helsinki.FI, 1992
  5444.      Linux port
  5445.        Tim P. Starrin, NASA Langley Research Center Operations,
  5446.      1993
  5447.      Read-only variables
  5448.        Dave Schweisguth, Yale University, 1993-4
  5449.      New manpage and tcsh.man2html
  5450.        Larry Schwimmer, Stanford University, 1993
  5451.      AFS and HESIOD patches
  5452.        Luke Mewburn, RMIT University, 1994
  5453.      Enhanced directory printing in prompt
  5454.        Edward Hutchins, Silicon Graphics Inc., 1996
  5455.      Added implicit cd.
  5456.  
  5457.  
  5458. THANKS TO
  5459.        Bryan Dunlap, Clayton Elwell, Karl Kleinpaste, Bob Manson,
  5460.        Steve Romig, Diana Smetters, Bob Sutterfield, Mark Verber,
  5461.        Elizabeth Zwicky and all the other people  at  Ohio  State
  5462.        for suggestions and encouragement
  5463.  
  5464.        All  the people on the net, for putting up with, reporting
  5465.        bugs in, and suggesting new additions to  each  and  every
  5466.        version
  5467.  
  5468.        Richard    M. Alderson III, for writing the `T in tcsh' sec-
  5469.        tion
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476. Astron 6.07.02         27 October 1996               83
  5477.  
  5478.  
  5479.